A couple of years ago in the Captial Area Timex/Sinclair (CATS) Newsletter, Duane Parker ran a Prime Number benchmark on the QL using different languages. Later, Herb Schaaf converted the benchmark to C and ran it on a number of different computers.
This benchmark provides a fair measure of how each computer compares with each other or how various languages or compilers compare on a computer. To compare computers, it only works using like languages on the different computers. A compiled C program on a VAX can not compare with an interpreted program on a QL.
To get an idea of how fast the Z88 is, I ported the Basic version of the benchmark for the QL and ran it on the Z88. On the QL using SuperBasic, it took 245 seconds. On the Z88 it took 326 seconds. Since the QL is fairly slow in it’s printing of text on the screen, I ran a version that did not print out the prime numbers. The QL dropped it’s time down to 229 seconds. I ran the same version on the Z88, but it still took it 326 seconds. From this we can conclude that printing text does not affect program speed.
Using the QL’s faster number, the results show that the QL is 1.4 times faster than the Z88. Considering that the Z88 is running a Z80 (8-bit) at about 3 MHz and the QL is running a 68008 (32-bit with an 8-bit bus) at about 7 MHz, the Z88 is not doing too bad.
The prime number benchmark determines all of the prime numbers from 32767 to X, where X is less than 32767 and greater than 0. In the benchmarks that I ran, I had the program determine the primes from 32767 to 29000. This was the same numbers used in the original comparisons.
Just for the record here are the results from the previous benchmarks.:
QL Forth79 23 Secs.
QL Pascal 27 Secs.
Computer One Pascal 67 Secs.
SuperBasic 245 Secs.
Small-C 16 Secs.
PS/2-30 w/ Turbo-C 6 Secs.
IBM w/ MIX C 5 Secs.
10 PRINT "Stop Calculations at what value less than 32767?"
20 INPUT V
30 P = 32767 DIV 100
40 IF V>32767 OR V<0 THEN PRINT "INVALID": GOTO 10
50 PRINT "Primes < 32767 & > ";V
60 A$ = TIME$
70 FOR I = 32767 TO V STEP -2
80 FOR J = 3 TO 191 STEP 2
90 IF ( I MOD J ) = 0 THEN GOTO 140
95 NEXT J
100 IF (I<P*100) THEN PRINT : P=P-1
110 PRINT I;" ";
140 NEXT I
150 B$ = TIME$
160 PRINT A$
170 PRINT B$
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.