3 ms·
At one point data structures were tuned to work fast when loaded from disk (avoid seeks, try to read linearly). Then they were tuned to work fast from inside m
by ars 16y ago
At one point data structures were tuned to work fast when loaded from disk (avoid seeks, try to read linearly).
Then they were tuned to work fast from inside main memory (avoid jumps).
Now they are tuned to work within the typical cache of a CPU (keep reads near each other).
- anamax 16y agoYou forgot tapes (don't seek, and we mean it) and avoid arithmetic. Today, divides can be cheaper than branch mispredictions and cosines can be cheaper than cache misses.