News for hackers. Stuff that matters.
Re:ZX Spectrum Raytracer by pardoned_turkey on Wednesday January 24, 2024 @07:11PM (#39124464)
Well, yes and no. You're correct that ZX Spectrum is a lot slower than the author estimates, but there's also a software-side performance bottleneck: the code is written in the built-in BASIC language, which on ZX Spectrum, was not only interpreted at runtime, but also almost comically unoptimized. For example, people would use "aftermarket" circle-drawing routines that performed 10x better than the stock ROM implementation.

BASIC on ZX Spectrum was meant for learning, but no serious software of the era relied on it for anything that needed to run fast.

I suspect this code could be 10x faster if written in assembly or a compiled language (a handful existed for the platform).

Re:ZX Spectrum Raytracer by YZF on Thursday January 25, 2024 @01:03AM (#39126660)
Yeah, there was a C compiler, a Pascal compiler... I'm pretty sure others. I would guess at least 100x for an optimized assembly version. Even 500x between this sort of interpreter and assembly is not unheard of.
Re:ZX Spectrum Raytracer by lproven on Thursday January 25, 2024 @09:16AM (#39129760)
Re:ZX Spectrum Raytracer by YZF on Thursday January 25, 2024 @09:16PM (#39138197)
HiSoft... that does bring back some memories.
Re:ZX Spectrum Raytracer by pjmlp on Thursday January 25, 2024 @04:14AM (#39127667)
After learning to code on it, we used BASIC as means to write the utilities to load DATA statements representing Assembly code, hexdump monitors or compiled languages, although the later were relatively hard to take advantage of, given the space requirements.