News for hackers. Stuff that matters.
Re:The Unreasonable Effectiveness of C by ori_b on Thursday January 10, 2013 @04:45PM (#5039977)
Yes. You read about how the cache works, and design the code to take that into account. This is usually done through techniques like cache coloring (http://en.wikipedia.org/wiki/Cache_coloring), loop tiling (http://en.wikipedia.org/wiki/Loop_tiling) and other techniques that depend on the way that the cache works internally.

In addition, many CPUs provide prefetch instructions to make sure data is in cache before it's used, or cache-skipping loads and stores to prevent polluting cache with data that's only ever touched once.

There are no comments on this comment yet.