Hacker News new | ask | show | jobs
by csande17 828 days ago
The "processor-memory performance gap" is a big reason why lookup tables aren't as clear of a win on modern hardware as they were on the SNES.

If it takes two CPU cycles to read from RAM, a lookup table will basically always be faster than doing the math at runtime. If it takes fifty cycles (because, while your RAM may be faster, your CPU is a lot faster), and your processor has more advanced hardware that can do more math per cycle, maybe just doing the math is faster.

1 comments

I think this is the only answer that addresses the issue. We always underestimate the cost of a read. and overestimate the cost of a compute.