Comment A knowledge of cache behaviour (Score 1) 336
As a game developer, I use a lot of C++, and performance is important. That's really a big part of the draw of C++ for game development. So when interviewing new grads I often ask them a bit about cache behaviour. Most really don't have a clue, but those who do show an understanding get high marks because it shows they've dug a little deeper than the rest:
Questions like:
- "Tell me what cache memory is and why it's important."
- "Let's say I have a list of objects with various bits of data like position, color, velocity, etc.. I can organize the list as an array of structures or a structure of arrays. Why might I choose one over the other and?" The best answer: "It depends on your usage patterns." and then they explain why.
Not understanding cache behaviour is the first step to making even the prettiest code run slowly.