Common Optimizations -- Andrzej Krzemieński
Today from the desk of Andrzej:
Common Optimizations
by Andrzej Krzemieński
From the article:
Language designers, compiler and library vendors make a great effort to make your programs run faster and faster. This post is a tour of some common performance optimizations in C++.
Consider the following code that deals with
std::string: ...

Some high-performance techniques that you an use for more than just parsing, including this week's darling of memory management:
When you see anyone claim performance parity between <other language> and C++, one of the first things to look for is whether the C++ version of their test code is correctly using arrays and traversing them in order. If the test code is just doing equivalent pointer-chasing in both languages, the performance comparison is largely meaningless because the program is probably memory-bound and not properly written to use C++'s default container (