3 ms·
[do not use lookup tables, they unnecessarily fill the cache...] Good point. A major misconception that a lot of people have is that lookup tables are always f
by Unklejoe 10y ago
[do not use lookup tables, they unnecessarily fill the cache...]
Good point. A major misconception that a lot of people have is that lookup tables are always faster than actually calculating a value, but cache locality is usually not given as much attention.
- cesarb 10y agoIt used to be true in the past. Back then, processors were slower, and they had no cache, since the processor and memory speeds were roughly matched. A few integer multiplications would be enough to cost more than a single memory access. It should still hold true today for small embedded processors with slow arithmetic and no cache.
- beached_whale 10y agoThey often lack ram too, so that const lookup table could be sitting on flash.