topics: BGP / IPv6 / more · settings · b&w · my business: inet⁶ consult · Twitter · LinkedIn · email

The Battle Royale: benchmarking old computers     (posted 2022-03-29)

On his Youtube channel, Matt Heffernan has a series of 8-bit Battle Royale videos to see which 8-bit computer is fastest. For this, he uses a simple program to calculate the world's lowest resolution mandelbrot set. Still, the Commodore 64 and ZX Spectrum take minutes to do this in BASIC. It's much faster in assembly.

(Aside: I do believe the Z80 CPU has some advantages over the 6502 due to all the arithmetic. I'd expect in a sort test like the one I did some time ago, the 6502 would do better relative to the Z80. I'd probably stick to just the insertion sort, as it's so simple to implement: something like 20 lines of BASIC should do it. The prime calculation test that I used to see which programming language is fastest is even shorter and simpler, but again math-heavy.)

Watching the videos, I started wondering how 16 or 32 bit computers like the Amiga would perform. Or even the C64 with a C version of the same program. So I made a C version, taking advantage of the fact that you can change text colors with ANSI escape codes, so no need to work with real graphics.

Just like the BASIC version, the initial version of the C code used floating point math. I added an 8.8-bit fixed point version to match the 6502 and Z80 assembly versions, but I'm not sure if I got that completely right as the output looks noticeably different.

This is the code. I compiled two Amiga versions that use the ixemul.library: floating point and fixed point as well as a version that doesn't require ixemul.library. That last one won't report its run time, so it's less useful on very fast systems where a stopwatch won't provide accurate results.

On my Amiga 1200 with its 50 MHz 68060 accelerator, the floating point version runs in 0.74 seconds and the fixed point version in 0.64 seconds. With the accelerator disabled so using the stock 14 MHz 68EC020 and just chip RAM, it's 4.4 and 2.04 seconds, respectively. On my Amiga 3000 with its 25 MHz 68030 the results are 2.12 and 1.4 seconds.

If you try this on any other machines, I'd love to hear your results. I'm especially interested in results from 7 MHz 68000 Amigas and the C64.

by .

Archives: 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022