2 ms·
> The costly operation in the example is accessing a large 2D array along the non-dense axis. For big enough arrays, that's a cache miss every time. I half-rem
by yorwba 10y ago
> The costly operation in the example is accessing a large 2D array along the non-dense axis. For big enough arrays, that's a cache miss every time.
I half-remember hearing about memory-prefetchers smart enough to detect this kind of strided access and fill the cache accordingly.
- mnw21cam 10y agoThen it turns from a cache miss problem to a memory bandwidth problem. If you are only using a small proportion of the cache line in your calculation, then you effectively multiply the data transferred to the CPU.