Boost logo

Boost :

From: Hamish Mackenzie (hamish_at_[hidden])
Date: 2002-04-17 08:14:01

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.

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.

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


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