While this is obviously an extreme case the reality is that one must consider the cost of precalculated data, you can do quite a few operations for the cost of reading one answer from a table that doesn't fit cache. And there can be substantial benefits when iterating multi-dimensional arrays correctly. A total flip from when I started out where you considered the cost in memory from precalculating (is it worth the memory to build this table of square roots??) to now where the cost in time from looking up the answer (is it worth the memory fetch to look up that square root? Nope.)
A side effect of doing this mapping, even without the hardware, is that the mapping makes a given task inherently parallel, and much, much easier to spread across low cost CPUs. I think of it as a universal solvent for computation.
GarvielLoken•9mo ago
https://unity.com/dots