Boost logo

Boost Users :

Subject: Re: [Boost-users] g++ compilation is slow with Boost's constructs
From: Ilya Murav'jov (muravev_at_[hidden])
Date: 2010-09-13 07:17:10


Mathias Gaunard пишет:
> On 06/09/2010 23:23, Ilya Murav'jov wrote:
>
>> - BOOST_FOREACH costs 0.1 sec
>> - boost::function<> invocation costs 0.05 sec
>> - boost::lambda::bind() with placeholders costs 0.1 sec
>> - Boost.Range adaptor transformed() costs ~0.1 too
>> As you can see, 10 boost::lambda::bind() slow down your compilation for
>> whole 1 second!
>
> Templates are memoized, so the cost of n instantiations is typically
> quite less than n times the cost of one instantiation.
>

Yes, you're right (maybe I misused the terms a little). But in a typical
 source file most applications of templates lead to "different"
instantiations (so memoization can't help), especially with
boost::lambda::bind() .

Regards,
 Ilya


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