What allocators are available out there for use with STL when dealing with small objects. I have already tried playing with pool allocators from Boost, but got no performance improvement (actually, in some cases there was considerable degradation).
You didn't say what compiler you use, but it probably comes with a bunch of pre-built allocators. This is on a Mac with gcc 4.2.1:
~$ find /usr/include/c++/4.2.1/ -name "*allocator*" /usr/include/c++/4.2.1/bits/allocator.h /usr/include/c++/4.2.1/ext/array_allocator.h /usr/include/c++/4.2.1/ext/bitmap_allocator.h /usr/include/c++/4.2.1/ext/debug_allocator.h /usr/include/c++/4.2.1/ext/malloc_allocator.h /usr/include/c++/4.2.1/ext/mt_allocator.h /usr/include/c++/4.2.1/ext/new_allocator.h /usr/include/c++/4.2.1/ext/pool_allocator.h /usr/include/c++/4.2.1/ext/throw_allocator.h
Here's also a link to BitMagic project page that talks about how to build your own. Also check out small object allocator in the Loki library (and the book too).
The Microsoft Visual C++ standard library implementation provides several proprietary allocators for node-based containers (at least as of the soon-to-be-release Visual Studio 2010).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With