411 REFERENCE · Wikibooks
Optimizing C++/Writing efficient code
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
In this chapter, guidelines are presented for the avoidance of inefficient operations and for the preparation of source code for a possible optimization stage - all without jeopardizing code safety or maintainability.
Following these guidelines might result in no overall performance gain. But equally there is unlikely to be a performance loss. The guidelines can therefore be applied without worrying about their impact on performance.
It is advisable always to follow these guidelines, even in code portions that have no particular efficiency requirements.
Performance improving features
Performance worsening features
Constructions and destructions
Allocations and deallocations
Memory access
Thread usage
it:Ottimizzare C++/Scrivere codice C++ efficiente