Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2001-04-24 08:23:03


Eric -

> I just tried out the pool library. The pool_singleton worked fine and
> gave an easy 5+% speed up. Thanks!

Glad it helped!

> But when I tried to use pool_alloc, it had problems including
> <limits>. At first, I thought this was a type-o, so I changed it to
> climits, but it appears to be looking for std::numeric_limits, which
> isn't there. Surely someone else is using g++ (2.95-4 rpm on redhat
> linux) and knows a work around. Sorry, this is probably a dumb
> question.

Yes. There's already a work-around -- go ahead and change the <limits> to
<boost/pending/limits.hpp>. This change will be incorporated into the next
release (read: I'll finally install CVS tonight and try to change it :).

> BTW- Where can I find good online documentation on this std
> namespace?

It's been a long time since I looked at online std helpers, but there's
still the canonical SGI STL:
  http://www.sgi.com/tech/stl/

What I did long ago was order the ISO standard for myself ($18, and you can
download it right away):
 
http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%2D1998
(of course, that isn't exactly tutorial material...)

BTW:
Using pools does not guarantee a speed-up. In fact, I'm suprised you got
that much of a speedup on g++; their allocator (based on Doug Lea's, I
think) should already be tuned for smaller objects. Anyway, the main
purpose of pools is to have easier control over exactly how and when memory
alloc/dealloc happens. In particular, I had to bend over backwards to
support the Standard Allocator interface, so pool_alloc generally sees a
slow-down; you may not want to use it.

        -Steve


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