Hacker News new | ask | show | jobs
by pillusmany 829 days ago
Games targetting pre-Pentium PCs also used precomputed trig tables.

Pentium was fast enough that it didn't matter as much.

Just a few years later it was slower to read a trig precomputed table.

2 comments

Yup, I remember watching a video about how the RAM bus is the bottleneck when running Super Mario 64 on the N64. The original implementation used trig lookup tables, but the person optimized it by instead using Taylor series (I think) and some negation / shifting.
For anyone curious, the video:

https://youtu.be/xFKFoGiGlXQ

Also enjoy his discovery that, while the game got flak online for years due to the release build have files that were not optimized, it turns out most of the optimizations that were done were actually for the worse due the low instruction cache/ram (I forget the exact details.) Things like unrolling loops just increased the code size and required more slow code paging.
in other words, for those of us who remember, they used the equivalent of a slide rule
More like a Trigonometry table, which predates even slide rules:

https://en.wikipedia.org/wiki/Mathematical_table