#include #include #include #include #include struct A { double x; int i; }; typedef std::map< double, A, std::less, boost::fast_pool_allocator< std::pair>> m_t; template void test(M & m) { std::clock_t start = std::clock() ; for( int i = 0 ; i<100000 ; ++i ) {m.insert(std::make_pair( 10000*std::cos(i),A{0.5,i}));} std::cout << ( std::clock() - start ) / double(CLOCKS_PER_SEC) << " secs.\n" ; } int main() { m_t m; test(m); std::map m2; test(m2); boost::singleton_pool)>::release_memory(); }