Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-03-20 17:23:11

Steven Watanabe wrote:
> Eric Niebler wrote:
>> One of the big sources of slow-down is the operator() overloads on
>> expr<> ... there are N specializations of expr<>, and each one has
>> N overloads of operator(). That's O(N^2) growth. With a variadic
>> operator(), I should be able to knock that down to O(N).
> In that case, since Marcus wants a larger arity for automatically
> generated exprs rather than ones created using operators, couldn't
> you set the max arity for the function call overloads separately from
> the max expr arity? How are compile times if you keep the function
> call arity fixed at 5?

A quick test shows this to be a very good way to keep compile times
under control.

Max arity Max Function call arity Compile time (sec)
40 40 24.1
40 5 14.0

Thanks for the suggestion.

Eric Niebler
Boost Consulting

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