Boost logo

Boost :

Subject: Re: [boost] [TR1] tr1 functional compile time looks strange
From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2011-04-27 12:11:06


On Wed, Apr 27, 2011 at 11:41 AM, falcou <Joel.Falcou_at_[hidden]> wrote:
> On Wed, 27 Apr 2011 15:42:32 +0100, John Maddock <boost.regex_at_[hidden]>
> wrote:
>> They're the same result_of, *unless* you've configured TR1 to use GCC's
>> native result_of in which case the issue is out of our hands.... though
> of
>> course tr1/functional.hpp #includes a whole lot of stuff that
>> utility/result_of.hpp doesn't.
>
> May end up as noise sorry. Seems my whole box take ages preprocessing
> whatever.
> Ran the same test elsewhere and stuff looks normal.
>
> I'll investigate though just in case it is a failure releated to gcc
> darwin.

I think the extra time is simply due to the extra stuff included in
functional.hpp. I get the following with boost trunk:

$ echo $OSTYPE
darwin10.0

$ g++ -dumpversion
4.5.2

$ cat test.cpp
#if defined(INC_TR1)
# include <boost/tr1/functional.hpp>
#elif defined(INC_UTILTIY)
# include <boost/utility/result_of.hpp>
#elif defined(INC_EXTRA)
# include <boost/utility/result_of.hpp>
# include <functional>
# include <boost/ref.hpp>
# include <boost/mem_fn.hpp>
# include <boost/bind.hpp>
# include <boost/function.hpp>
# include <boost/functional/hash.hpp>
#endif

$ time g++ -Itrunk -DINC_TR1 -c test.cpp

real 0m0.432s
user 0m0.388s
sys 0m0.041s

$ time g++ -Itrunk -DINC_UTILITY -c test.cpp

real 0m0.021s
user 0m0.008s
sys 0m0.009s

$ time g++ -Itrunk -DINC_EXTRA -c test.cpp

real 0m0.429s
user 0m0.384s
sys 0m0.036s

Daniel Walker


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