Boost logo

Boost :

From: Arno Schödl (aschoedl_at_[hidden])
Date: 2008-09-02 11:38:24


> > The RangeEx documentation writes something like "what algorithms are to
> > containers, adaptor ranges are to ranges". Whenever you are applying one
> > (non-permutating) algorithm to a container, and then another and then another,
> > you can stack range adaptors. It's like lazy evaluation of a Haskell list.

> Sheesh; give me a little credit, please. I know what range adaptors do.

So why are you asking these questions then? With smart compilers, generic programming is supposed to produce code that is pretty close to handcrafted code. That is what people expect, and that is what generic programming is sold on. The current range adaptors were far from it. And even if stacks don't exceed size 3 or 4 in practice, which is all I have in my code, why produce code that is factor 8 or 16 slower or more storage-bloated than necessary? As we have seen, the reason was not that the problem is intractable with generic programming. It just took a little thought to do it right.

--
Dr. Arno Schoedl · aschoedl_at_[hidden] 
Technical Director 
 
think-cell Software GmbH · Invalidenstr. 34 · 10115 Berlin, Germany 
http://www.think-cell.com · phone +49-30-666473-10 · toll-free (US) +1-800-891-8091
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl · Amtsgericht Charlottenburg, HRB 85229

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