How to decrease the number of possible cache misses when designing a C++ program?
Does inlining functions help every time? or is it good only when the program is CPU
Avoid using dynamic memory when it's not necessary. Using new, delete, smart pointers, and so on, tends to spread your program data across the memory. That's not good. If you can keep most of your data together (by declaring objects on the stack, for example), your cache will surely work much better.