After a good choice of build settings the next most important thing you can
do, is choose your compiler - and the standard C library it sits on top of
- very carefully. GCC-3.x in particular has been found to be particularly
bad at inlining code, and performing the kinds of high level transformations
that good C++ performance demands (thankfully GCC-4.x is somewhat better
in this respect).