Code:
10 ' Ahl's Simple Benchmark 20 FOR N=1 TO 100: A=N 30 FOR I=1 TO 10 40 A=SQR(A): R=R+RND(1) 50 NEXT I 60 FOR I=1 TO 10 70 A=A^2: R=R+RND(1) 80 NEXT I 90 S=S+A: NEXT N 100 PRINT ABS(1010-S/5) 110 PRINT ABS(1000-R)
test (shown above) that they used whenever they reviewed new personal
computers. In the January 1984 issue, the editor and author of the benchmark,
David H. Ahl, stated that "the Creative Computing benchmark is a short test of
computational speed, accuracy, and the random generator in Basic. We have
taken note of the criticisms of this simple test and are in the process of devising
a more comprehensive one." Several months later, they concluded that the
revised benchmarks weren't any more accurate and decided to stick with the
original.
However, what makes this benchmark test interesting is not its effectiveness or
suitability as a benchmark, but rather, the amount of historical data available
enabling us to compare current systems with those from 20 years ago. Back
then, virtually all of the tests were conducted against BASIC interpreters that
shipped with most personal computers. I've listed some of the more popular
systems below, along with some tests I conducted myself using six popular
BASIC compilers, including VB.Net. The compiled executables were run on an
old Compaq Armada 1750 (Pentium II 366 MHz), and the timings were averaged
over 5000 iterations. So far, PB/DLL is the clear winner. (Note that I have
dispensed with the accuracy and random number generator results.)
I'd be interested in seeing results from C++, Delphi and PB/DLL with inline
assembly. Of course, they would need to be run on the same system used for
the other compiler tests. I'm thinking of putting up a Web page where the
different compiled executables could be downloaded, so that the entire batch
of tests could be run against a common system. The page could provide a
database of previous results and allow new result sets to be submitted as
faster systems (and compilers) are introduced.
Code:
Compiled dd:hh:mm:ss PB/DLL 6.1 0:00.00145 VB.Net 7.0 0:00.00377 Visual Basic 6.0 0:00.00482 FirstBasic 1.0 0:00.00227 PowerBASIC 3.2 0:00.00244 QuickBASIC 4.5 0:00.00873 Interpreted dd:hh:mm:ss Pentium 90 (GWBASIC) 0:00.13 Cray 1 0:00.01 DEC Rainbow 100 0:20 IBM PC (4.77 MHz) 0:24 Coleco Adam 0:47 Macintosh 1:36 Apple III 1:48 Vic 20 1:49 Commodore 64 1:53 Apple II+/e 1:53 Timex/Sinclair 1000 (fast mode) 2:43 TI 99/4A 3:46 Sinclair Spectrum 4:39 TRS-80 Model 100 4:54 Atari 400/800 6:48 Timex/Sinclair 1000 (slow mode) 16:55 HP-11C Calculator 30:34 TI SR-50 Calculator 12:17:00:00
[This message has been edited by Dean Sadites (edited February 17, 2002).]
Comment