Nested loops with index locality P&L: -3 (≃ -4025 JPY)
Can we loop and avoid cache misses for computer performance?
YAML
企画
生産
If you iterate over data, the most efficient retrieval is where the data is all in a line.
How do we arrange data so that data is always near the previous data we retrieved?
-3.0000 ħ (3.0 HUR) (+0.0)
I wrote a nested for loop that iterates in reverse order between iterations to minimize cache misses.
私はこれに数時間を費やしました。
これをプログラムのすべてのループに適用すると、さらに効率的なプログラムを作成できます。
- 元の言語で表示 -
I spent a few hours on this.
If this was applied to all looping of programs, we could have even more efficient programs.