6 Jul
2004
6 Jul
'04
4:56 p.m.
Peter Dimov wrote:
Your test is still very unrealistic. You create a large number of objects in one batch, then destroy them afterwards. A more realistic scenario would have creation and destruction interleaved.
The most accurate test would be to try Boost.Pool with your actual application and see how it affects its real-world performance. It's still possible for it to be slower, of course, but at least you'd measure the real thing.
OTOH I could not find an application where pool_allocators outperformed Intel's small object allocator strategy. So at least with Intel's C++ compilers pool_allocator is nice to have, but gained me nothing until now. IMHO this belongs to namespace premature_optimization. Markus