Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-20 10:25:52


Eric Niebler wrote:
> Here are the compile times for libs/xpressive/test/test2.cpp, a fairly
> rigorous workout for Proto, for different max arities.
> <snip>
> As you can see, beyond 20 things begin to get bad, but not dramatically
> so. 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 picking a max arity for a DSEL, I think we reach the limits of human
> readability (a function that takes 20 arguments?! Really?) before we
> reach Proto's breaking point.

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?

In Christ,
Steven Watanabe

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