5
Game++. Part 2.2: Types of optimization
(pvs-studio.com)
I'm not a game dev but work in a scientific field. One thing I didn't see mentioned here which may or may not be relevant is it pays to try to keep your memory footprint as low as possible. Memory I/O is a bitch. So for example, let's say you have 2 vectors that interact in some way. You may be tempted to store precalculated interactions in a matrix, but generally speaking, it's best not to do this. Just calculate each cell of the matrix on the fly as you need it, even if it's a long formula and you need to access this same value many times. 2 vectors are more likely to fit in L1 cache and you'll get the best performance out of all the compiler optimizations. It makes a huge difference.
The center for all discussion and news regarding C++.