Function templates

The more code resolved at compile time, the better.

Inlining

The compiler replaces the function call with the body of the function.

Branchless programming

Branchless programming removes the need for branch prediction, which removes branch misprediction entirely.

CRTP

The Curiously Recurring Template Pattern (CRTP) is static polymorphism, as opposed to virtual functions, which are dynamic polymorphism. CRTP has no runtime overhead. CRTP is preferable to virtual functions as well as Runtime Type Information (RTTI).