News for hackers. Stuff that matters.
Re:CPU Cache Essentials by sliverstorm on Wednesday June 25, 2014 @06:21PM (#7947099)
From what I've read, the real worry with (for example) C++ is not whether you can control packing or memory ordering. The real worry is when you create data structures that are fundamentally cache-unfriendly. The compiler won't reachitect an object into other objects to make it more memory friendly.

Simple example from the slides on optimizing for the PlayStation 3; if your object is large and full of different data, you miss a lot and burn lots of cache space every time you access it because it is so large. If your object is small and just a collection of pointers, you burn little cache space when you load it, and data can be arranged more appropriately.

http://research.scee.net/files/presentations/gcapaustralia09...

There are no comments on this comment yet.