The tests are not identical to those used by the performance TR, primarily to address some slightly questionable pratices (e.g., not initializing variables) and to fit them into the commonly used framework. Also, compilers have become a lot smarter and actually see through a number of the uses and entirely optimize away what is intended to be measured. Thus, the tests use xor instead of addition because compilers see through the use addition and optimize the entire loop out while they don't optimize this use of xor.
unsigned int x(0u); unsigned int n(10000000u); for (unsigned int i(0u); i != n; ++i) { x ^= i; }with the core of the loop (
x ^= i;
) replaced by a function call
using an object suitable for the function call to be worked on.
x | an object of base type X |
xp | a pointer to an object of type X |
y | an object of derived type Y using X as a base |
yp | a pointer of derived type Y using X as a base |
o | an object of type S |
nm | non-member |
s | static |
nv | non-virtual |
v | virtual |
o | defined in other source file |
i | defined inline |
c | defined in the class body or upon its first declaration |
p | a pointer to function or pointer to member function |