Subject: Re: [boost] [function] The cost of boost::function
From: Hite, Christopher (Christopher.Hite_at_[hidden])
Date: 2012-04-17 09:19:01
> I have compiled it with Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 the following way (maximal optimization):
> cl -EHsc -Ox -GL -Ob2 -Oi -Fa -IE:\Work\3dparty\boost_1_48_0 m054.cpp
Actually the whole program has no effect. I'd expect gcc to whipe out at least B and C.
Perhaps I expect too much from my compiler. If there's no type deletion I expect it to inline everything out reasonably. For example std::for_each shouldn't be any slower than regular loop.
I notice "vtable". I thought I read boost::fuction was impled using function pointers instead of inheritance. I wonder if something changed and why.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk