Hacker News new | ask | show | jobs
by rbobby 26 days ago
The Apple ][ basic interpreter placed its "get next token" routine down in the first 255 bytes of the computer's memory. Being there allowed for the machine instructions to be fetched twice as fast as "high memory". And "get next token" is definitely a good guess for hotpath.
1 comments

C64 also has a token parsing routine in zeropage.
I've benchmarked Applesoft and Commodore BASIC quite a bit and they benchmark exactly the same, so I'm not surprised. Both systems run at 1.023 MHz in NTSC. Of course, they are both derived from Microsoft's 6502 BASIC. I'm sure they're not cycle exact but they are close enough that BASIC doesn't show any difference.