CFOG's PIP, August 1987, Volume 5 No. 10, Whole No. 58, page 8

Experiments in Program Execution Speed and Accuracy

by Steve Lucius

In converting Basic programs back and forth between my Osborne 1, my XT clone and the AT clone at the office I have seen that going from the 8 bit to 16 bit machine did not always result in a great speed improvement. In fact until I got Borland TurboBasic the speed winner for one program that I use a lot was the O-1 using Bascom.

In order to explore this idea I took a program for finding prime numbers using GW-Basic and converted it to M-Basic, O-Basic, Bascom, Fortran and Borland TurboBasic. The program finds all the prime numbers from 1 to 1000. The program takes 60,195 iterations to complete, so raw speed is a necessity here.

On my O-1 with stock CP/M and 1.44 ROM I tested the program with M-Basic, Bascom, Fortran, and C-Basic. (The Bascom was optimized for Z-80.) The second series of tests were run using a CP/M coprocessor on a Cordata XT clone, which uses a faster and newer Z-80 than the O-1. The languages tested were M-Basic, Bascom, Fortran, C-Basic AND O-Basic. (Bascom will not compile properly on this coprocessor but the compiled programs will run.

A third series of tests were run using the Cordata in its' 16 bit mode using GW-Basic and Borland TurboBasic. The Cordata has a V-20 processor and 8087 co-processor. GW-Basic doesn't use the 8087, the TurboBasic uses it to good advantage. (Software is DOS 2-2, TurboBasic 1.0, and GW-Basic 2.02)

Machine Language Time to Test
1000 Numbers