Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-16 16:03:23


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

> On Tue, 2002-04-16 at 16:43, David Abrahams wrote:
> > It doesn't surprise me. See
> > http://users.rcn.com/abrahams/instantiation_speed/index.html. The
> > implementations of template matching in some of these compilers
is...
> > well, let's just say it wasn't designed with metaprogramming in
mind.
> > Lots of linear list searches, for example.
>
> The thing is that gcc seems to do a very good job at simple top-level
> recursion. I upped the list size to 200 and it still took around 4
> seconds to compile. This goes up to 9 seconds if I get it to return a
> boolean value.

It's a toy example, though. Depending on the order of template
instantiation, in a large program you might find yourself doing very
badly. Of course, the same kinds of capricious penalties apply to MPL
algorithms.

-Dave


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