10 ms·
Compilers are pretty good most of the time. If it was a platformer game, it'd have been fine in vanilla C. But this engine was desperate to squeeze absolute ma
by pornel 4y ago
Compilers are pretty good most of the time. If it was a platformer game, it'd have been fine in vanilla C.
But this engine was desperate to squeeze absolute maximum performance (including hacky hacks to get extra registers), and you can't get that from C.
GBA has some quirks, like the CPU with SRAM that isn't a cache, but an explicitly addressable small bit of memory. If you want functions "cached", you have to do it yourself. It's doable in C with some hacks, but it's an area where code size matters. Getting C code to be small and maximally fast is a https://en.wikipedia.org/wiki/Full-employment_theorem https://en.wikipedia.org/wiki/Full-employment_theorem
- deleted 4y ago[deleted]