Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-15 19:36:57


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

> Ok I've read most of it now including "Loop unrolling" 2.3.8. Firstly
> might I say it is a superb document and I will remember to refer to it
> before I try to understand the code in future.

Well, I think you flatter us. It's very rough, still, but I'm glad it's
useful.

> Am I correct in thinking that the number of template instantiations is
> not reduced only the depth?

True. Probably the opposite.

> How much does this affect speed and on
> which compilers (see last line of 2.3.8)?

We only had time to run the speed tests on one compiler (MSVC). We saw
about a 10% increase on lists with ~50 elements with unrolling depth ==
4. Knowing something about what makes EDG compilers slow, tests on one
of those compilers could be much more interesting.

> Also is CVS up to date? I still can't find fold in my copy?

Were you looking on the mpl_v2 branch?

> > > * Testability (ie. you can check one implementation against the
other)
> >
> > Not worth it, IMO. Especially since getting both implementations to
run
> > in the same program breaks the ODR (or requires renaming hacks).
>
> I was thinking of a rule in a make file to build each test program
once
> with the appropriate define (see #ifdef in previous post) and once
> without then compare the output of the two binaries.

A lot of effort. You'd have to come up with a random test case generator
to even begin to make it worthwhile, but... y'know, be my guest.

> Wont it still end up with N * fold_step in the message, which has four
> template arguments (as opposed to two)?

I don't think so. Why don't you try it and find out? Speculation is a
waste of time when you can verify.

-Dave


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