Remix.run Logo
klelatti 3 days ago

The interpreter is doing a lot that you’ve not mentioned here; parsing the BASIC source code for example.

guenthert 3 days ago | parent | next [-]

Er, the parsing is done ahead of time. The BASIC interpreters then were byte-code interpreters; the one of the beeb a particular fast one.

I know nothing about the first ARM, but ARM2 of Archimedes (anno 1987) was significantly faster than a MC68k (both at 8MHz), both much faster than a 6502 at one (typical) or two (in the beeb) MHz.

A BASIC interpreter using the ARM 1 or 2 might not have been literally faster than machine code on a 6502 (certainly not for some silly micro benchmarks), but, the stated goal, allowing high level programming where earlier assembly was required, certainly was met.

tomatocracy 3 days ago | parent [-]

The early 8MHz ARM2-based Archimedes machines arguably also outperformed contemporary 16/20MHz 80386 machines (due to the x86-based machines being slower to access RAM before the advent of on-motherboard cache and zero waitstate RAM) as well.

tom_ 3 days ago | parent | prev [-]

You can probably make it happen. If your program uses all the same tricks that worked with 6502 BBC BASIC to reduce the interpreter overhead, the ARM BASIC version will run as well as it can. Then imagine your program does a lot of integer maths with the resident integer variables, multiplication in particular, and (for whatever reason) it needs the full 32 bit integer precision - I'm sure you would stand a chance! 32 bit operations are cheap on the ARM, and it's got a multiply instruction. No such luck with the 6502.