ClockSp, ClockSp4 - Test BBC BASIC interpreter speed ==================================================== J.G.Harston -- mdfs.net/bbcbasic/Testing Version 2.01 -- 15-Mar-2002, 11-Feb-2013, 10-Sep-2015 x.3x - variet and forced real ClockSp is a program that does various timed BBC BASIC actions to test the speed of the interpreter. ClockSp is calibrated so that a BBC model B with most interupts turned off gives 2.00MHz, ClockSp4 is calibrated so that a BBC Master 128 with most interupts turned off gives 2.00MHz. Note that ClockSp tests the speeds of BBC BASIC. A test that times reading or writing files tests the filing system, not the interpreter. A test that times writing to the screen tests the VDU drivers, not the intepreter. ClockSp carefully times just BBC BASIC functionality, NOT hardware or operating system functionality. Consequently, ClockSp can be a good way of testing machine language coding efficiency as it tests a large suite of machine code rather than just specific bits of code. It can also show how much background interupts are interfering with foreground code. As an example, Z80 code is denser than 6502 code, but with the same processor clock runs more slowly. Tests comparing the 2MHz 6502 BBC model B with the 3.5MHz Z80 ZX Spectrum and the 6MHz Z80 CoPro shows a Z80 running at approximately 3.75MHz has the same performance throughput as a 2MHz 6502. This confirms the common rule of thumb that a Z80 needs twice the clock speed of a 6502 to do the same task at the same speed - as seen by the clock speeds used in common 6502 and Z80 systems. Interestingly, it seems that trigonometry/exponent code is the easiest to make more efficient on other processors, as all non-6502 tests show trig/log speeded up more than other code. To take account of this ClockSp4 is calibrated against BBC BASIC IV on the Master which has trig/log routines coded more efficiently for the 65C02. Version 2 has been tweeked and recalibrated so that it does an initial test to calibrate itself running on faster systems than version 1. Version 2.01 corrects an error in the string speed test.