Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-17 09:42:32


----- Original Message -----
From: "Hamish Mackenzie" <hamish_at_[hidden]>

> On Wed, 2002-04-17 at 13:22, David Abrahams wrote:
> > After some considerable thought, what you're saying makes sense to
me.
> > However, a question:
> >
> > Are you insisting on the use of iterators in an optimized count_if
for
> > reasons of generality? Of course it's always hard to tell what's
going
> > to make any given compiler's template engine happy, but this seems a
bit
> > like anti-optimization to me. What Hamish thinks he discovered was
that
> > GCC is really efficient at operating on simple type lists. Why
wouldn't
> > we want to capitalize on that? At least, it seems worth testing both
> > approaches to see how they compare. I'd only be willing to pay a
small
> > price for generality of the optimized version.
>
> Yeah its looking good. Here is an implementation of size that gcc
3.0.3
> compiles in 14.7 seconds for N=400. The generic mpl version takes 13.8
> seconds for N=10.

Have you tried comparing this with the optimization Aleksey proposed?

> I am not suggesting we shouldn't optimise the generic/portable version
> as well, but a 40:1 speed improvement might be hard to beat.

Hard to know without trying, eh?

> I would be interested to know what the results are for como (I have a
> copy of the beta version somewhere, but I haven't got around to
> upgrading)

Me neither. However, I have a bunch of Intel compilers which display
typical template instantiation performance for all but the most recent
EDG front-ends. Further, though, I don't think it's really worth testing
until the MPL version has loop unrolling in it again.

-Dave


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