Most optimizations are language-agnostic. Understand your code, and understand the hardware you're running on, and you can do most low-level optimizations.
Understand your problem domain, and suitable algorithms, and you can do any high-level optimizations.
The only C++-specific optimization advice I can think of is "understand what your code means". Understand when C++ copies temporaries around, understand which constructors and destructors are called when.
And prefer functors to function pointers, as the former can be inlined by the compiler. In general, move as much as possible to compile-time rather than runtime. Use templates to do the heavy lifting.
And of course, don't try optimizing until you've profiled and fount out that 1) optimization is necessary, and 2) what needs optimizing.
Edit:
A comment asked about functors vs function pointers being inlined. Here's the explanation:
Functions are usually compiled in isolation. So what does the compiler know about a function F that takes a function pointer FP as argument? Nothing, it has to go look up where the F is called from, and maybe there it can find a definite clue as to which function FP points to. If it can determine that when called from here, FP will ALWAYS point to function G, then yes, it can make an inlined version of F, with G inlined inside it, for this particular call site. But it can't simply inline G without inlining F, because F might be called from other places as well, where it is passed a different function pointer. And even then, it requires some expensive global optimizations to determine that anything can be inlined.
Imagine you pass a functor such as this instead:
struct Ftor {
void operator()() { ... }
};
so the function F looks like this:
void F(const FTor& ft) {
...
ft();
...
}
now the compiler knows exacty which function gets called: Line 2 in the function calls Ftor::operator(). And so the call can be inlined easily.
Of course, in practice, you'd typically template it, so the function can be called with any functor type:
template <typename F>
void F(const F& ft) {
...
ft();
...
}