Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-12-06 15:49:50

Joel wrote:

>> I'd like to see more tweakable
>> parameters for specific uses. I frequently deal with
>> different number expansions in a case to case basis.
>> For example, is it possible to have arity 3 for function
>> X and arity-5 for function Y? A single number seems
>> wasteful if I'm sure that a certain use needs only a few.
>> Is that possible?
> Yes, I think so. And it turns out to be a very good idea, as it
> potentially makes overload resolution *a lot* faster. Here comes the
> benchmark compiling do_the_bind.cpp, ported to use the forward adapter
> with gcc:
> Arity=8
> preprocess
> real 0m1.384s
> user 0m1.270s
> sys 0m0.109s
> preprocess, compile, link
> real 0m12.405s
> user 0m11.769s
> sys 0m0.540s
> Arity=4
> preprocess
> real 0m0.918s
> user 0m0.454s
> sys 0m0.081s
> preprocess, compile, link
> real 0m1.949s
> user 0m1.653s
> sys 0m0.268s

Wow that's interesting. Is the trend exponential?
Can't really tell with just 2 sample points.

> Interestingly preprocessing is a minor concern and so we could even
> provide means to take our pick at compile time (as opposed to
> preprocessing time).

Not so fast. Don't forget EDG.


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at