Boost logo

Boost :

Subject: Re: [boost] [GGL] [geometry] Inexplicable speed benefit when using Visual C++ 2010
From: Barend Gehrels (barend_at_[hidden])
Date: 2010-04-16 16:30:18


Hi Christian,

> We found that GCC 4.4 on Linux was about 100% faster than Visual C++
> 2008 on Linux without modifying the code.

I can confirm your speed measurement differences.

I have done about a year ago benchmarks with Boost.Geometry using some
different compilers. It is indeed the case that GCC was much faster then
VC 2008. However, the largest difference was between VC 2005 and VC
2008. The VC 2005 compiler produces to my findings much faster code than
VC 2008 does. I didn't measure 2010 (beta) at that time, but it seems
that the problem that was introduced in 2008 is now solved. Good news.

I've asked last year during BoostCon to Microsoft, present there, if
they knew this issue, but apparently they didn't, and told me it would
surprise him because the compiler basically was the same.

When I used after that once the VC 2008 command line compiler (so not
from Visual Studio) the problem disappeared. So it was fast. So it was
not the compiler itself, it was some setting in the IDE or VPROJ. I've
never managed to find which setting, though I studied it carefully.

See also our page here:
<http://geometrylibrary.geodan.nl/compiling.html> stating that "our
measurements indicate that MSVC 2005 generates faster code than MSVC 2008"

I just repeated my measurements, now also including 2010, so yes the
2008 issue is indeed solved.

VS 2005/VS 2010 fastest code
GCC 3.4.5/MinGW: slower (~30%)
VS 2008: very slow (~500%)

All VS using _SECURE_SCL=0. I'm talking about the Express versions of
all these three.

In my last 2010 measurement I turned of _SECURE_SCL and there was no
measurable difference (referring to last message in this thread)

Regards, Barend


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk