B e n c h m a r k i n g O n
N e t a d e l i c a
Here is the benchmarking program source.
I deliberately kept the program simple so it would run on as many BASICs
as possible. There's an 'engine' that handles the individual tests, and
it's written in a way that makes it easy to add your own benchmark
routines (see below for how to do this).
The program lets you perform one test at a time, or all tests, and lets
you write the results to a file. If you want to submit your test
results, please run the program and mail them to me using the following
template.
- CPU (manufacturer/CPU type/clock):
- Secondary cache (KB):
- FPU (yes/no):
- Graphics card:
- BASIC used (include version number):
- Compiled or interpreted (c/i):
- Compiler directives/optimisations used:
- OS (include version):
- Test results, average test time:
- Full results: (cut and paste from your output file)
For example:
- CPU (manufacturer/CPU type/clock): Intel, 486, 66
- Secondary cache (KB): 256
- FPU (yes/no): yes
- Graphics card: generic ET4000
- BASIC used (include version number): PB3.2
- Compiled or interpreted (c/i): c
- Compiler directives/optimisations used: $OPTIMIZE SPEED
- OS (include version): DOS6.22, Win3.11
- Test results, average test time: 25.7512
- Full results: results go here...
Some notes:
- Some of the tests are graphical. The program runs in SCREEN 9 and uses
page flipping to separate the graphics from the results screen.
- If you have to modify the program to make it work on your BASIC, please
try to keep as close as possible to the original code (data types, etc.)
- The bubble sorts are *deliberately* inefficient :-)
- The tests may be flawed - I'm no mathematician or scientist. They're
just the tests that I wanted to use and are good enough for my purposes.
The tests are as follows:
- Empty loop, integer, step=1 (12m)
- Empty loop, long integer, step=1 (12m)
- Empty loop, single precision, step=1 (600k)
- Empty loop, double precision, step=1 (600k)
- Empty loop, single precision, step=.137 (10k)
- Empty loop, double precision, step=.137 (10k)
- Division, integer, using \ (3m)
- Division, integer, using / (300k)
- Division, single precision (300k)
- Multiplication, integer (4m)
- Multiplication, single precision (150k)
- Trigonometry assignation, single precision (31.4k)
- String (re)assignation and concatenation (20k)
- Graphics, put pixels
- Graphics, lines (35k)
- Graphics, rectangles (60k)
- Graphics, circles (20k)
- Bubble sort, integer (1500 elements)
- Bubble sort, single precision (350 elements)
The numbers in brackets at the end of each line indicate the number of
executions/loops within each test. The numbers differ so I could keep
each test to within roughly the same execution time. Note that the units
are decimal, so:
How to add your own tests
Each test is a separate GOSUB subroutine. They're numbered 1, 2, 3... To
add a test, copy an "empty" subroutine framework from the end of the
program (e.g. test 20) and insert your benchmark code after the ELSE
statement. The test$ string in each subroutine is a short description of
what it does and how many times it does it.
Make sure that there is always an 'empty' routine at the end of the
program, with test$ set to "end".
Make sure that all the subroutines (including the last, empty one) are
always numbered in order.
There are two ON...GOSUB lines in the program. Make sure that all the
number match up. If you add tests 20 and 21, make sure that 22 is an
empty routine and that the ON...GOSUBs point to 1...20,21,22.
Back to the Netadelica home page