9 Benchmark
Bobbi Webber-Manners edited this page 2018-06-03 17:56:33 -04:00

I used the sieve.8b script to benchmark EightBall.

I set sz to 30 in order to compute the first 900 primes.

Timings include the the printing of the results.

EightBall v0.67 was tested, running on an Apple //e (1MHz 6502.)

  • Interpreter - took 6 mins 12 sec from run to termination.
  • Compiler - took 43 seconds from completion of loading bytecode until termination.

The compiler is achieving a speedup of 8.65 compared to the interpreter.

Update Tested with v0.68 which has some performance enhancements in the compiler and VM (to make cleaning up the call stack faster after function return). The compiled code now takes 41 seconds, a modest speedup. However this code does not do a lot of function call/return. Bigger improvements would be expected for more typical workloads.

Update 2 Tested with pre-release v0.70. This code has immediate mode VM instruction for jump (JMPI), branch (BRCI), call (JSRI) and load (LDAWI, LDRWI, LDABI, LDRBI). I have not done the same enhancement for the store instructions yet. Benchmark time is reduced to 32 seconds from completion of loading bytecode until termination. This is a pretty big speedup - 11.6 times as fast as the interpreter.

Update 3 Tested with pre-release v0.75 (on Apple II). The VM now uses zero page locations for evaluation stack and registers. Benchmark time is now 25 seconds from completion of loading bytecode until termination.

Update 4 Tested with pre-release v0.76 (on Apple II). Refactored the VM code to use a jump table. Benchmark time is now 21 seconds from completion of loading bytecode until termination.