Subject: [boost] [GGL] [geometry] Inexplicable speed benefit when using Visual C++ 2010
From: Christian Buchner (christian.buchner_at_[hidden])
Date: 2010-04-16 09:30:32
my first attempt to post to this list bounced, so I am trying again.
My employer is an early adopter of the Boost Generic Geometry Library
[GGL] in an engineering application related to mobile radio
communicatons. We use it to estimate and optimize the coverage of 4G
radio networks. Our code uses a lot of multi-polygon unions to
estimate the amount of ground covered (and not covered) by radio beams
and iteratively improves the antenna parameters.
We've been compiling and shipping our application with Visual C++ 2008 so far.
We found that GCC 4.4 on Linux was about 100% faster than Visual C++
2008 on Linux without modifying the code. This bothered us quite a bit
as both compilers were allowed to use full optimization. We found that
by optimizing (globaly overloading) the new and delete operators to
re-use allocated memory fragments on Windows we were able to get
nearly 50% speed benefit, so we attributed much of the performance
difference to sub-optimal memory heap management of Visual C++ 2008.
Then we tried recompiling the project with Visual C++ 2010 Ultimate
Release Candidate (RC). The speed gain of the algorithm was 900% (not
joking) and the results still appear to be correct. Now this is
surreal and no one here in the office has found a reasonable
explanation yet without going into the metaphysical domain.
Would anyone with knowledge of compiler and runtime internals be able
to make an educated guess as to how such a speed gain of factor 10 is
possible? Is anyone else seeing similar speedups in boost or in the
geometry library when compiling with Visual C++ 2010 RC (HINT: it's a
free download, so anyone can try it out until end of June 2010).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk