Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::function performance issues with C++11
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-07-04 07:27:01


On 4 Jul 2014 at 5:10, wrote:

> However, I found that it's quite slow when compiled with -std=c++11. In
> detail, it takes 173874 milliseconds with C++11, while it takes 3676
> seconds without C++11.
>
> About 50 times slower!! How can that be?
> [snip]
> In case you need to know my enviorment, my OS is Arch, compiler is gcc 4.9.0, and optimizations are default.
> The execution time (ms) of three versions I tried:
> boost::function with C++11 : 173874
> boost::function without C++11 : 3676
> std::function in C++11 : 29233
>
>
> Any thoughts are appreciated!

I'd check C++ 11 mode on GCC 4.6. It could be as simple as an
outdated GCC version switch.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net