« Analysis of abstraction penalty and MSVC | Main | What to test? »

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.


    Hi Chris,

    great work.

    I tried to file a bug on Release 2, but the link on the wiki went nowhere.
    [ Which link? You can also contact me directly at ccox at adobe dot com — ccox ]

    In functionobjects.cpp, every loop does “copy, ‘sort’, verify_sort”, except for “sort array with user-supplied functor” around line 334 which does “sort, verify_sort, copy”, which looks like a cut-n-paste bug.
    [ “drag and drop” edit strikes again! I’ll get that fixed shortly. — ccox ]

    anyways, great work… –nickg

    I appreciate the benchmarks. One thing – makefile.nt was not updated with these three new benchmarks.

    [ whoops, let me post a fix for that – ccox ]>/i>

Sorry, the comment form is closed at this time.

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.
Terms of Use | Privacy Policy and Cookies (Updated)