I do not understand why new/delete is slower than std::allocator. Is there a fundamental reason why it is so ?
The benchmark program attached gives the following timing for series of new/delete versus std::allocator allocations/deallocations. new/delete std::allocator g++ 3.3.2 -O3 : 2.45 s 1.56 s g++ 3.4.3 -O3 : 2.25 s 2.24 s g++ 4.0.0 -O3 : 2.13 s 1.30 s -- Summary: new/delete performance versus std::allocator Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sylvain dot pion at sophia dot inria dot fr CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20162