Second release
The second release of my benchmark is now available from http://stlab.adobe.com/performance/ .
Sorry for the delay. I meant to post new files every month or two, but Photoshop CS4 kept me busy for a while.
I’ve updated a few things in the existing files, and added 3 new files.
- Function Objects
- This is a benchmark for instantiation of simple functors, and partly a demonstration of the relative performance of function pointers, functors and inline operators. When a compiler works well, functors and inline operators should perform identically. Of course, there is some room for improvement.
- Simple Types Constant Folding
- Most developers assume that their compiler will do a good job of folding constant math expressions on simple data types. But do developers verify that assumption? One compiler does a decent job of folding the constants, but sometimes issues empty loops after removing constant calculations from the loops. Other compilers simplify some calculations but not other, similar calculations.
- Stepanov Vector
- What happens to performance when I replace a pointer with a vector iterator? And what happens if I use reverse iterators? This is a test of the compiler and of the STL implementation shipped with the compiler. It’s really sad to see good compilers brought to their knees by bad STL implementations.