Key Points

  • The global memory manager (implemented by new() and delete()) is general-purpose and consequently expensive.

  • A significant boost is available if you mostly allocate memory blocks that are confined to a single thread. A single-threaded memory manager is much faster than a multithreaded one.

  • If you develop a set of efficient single-threaded allocators, you can easily extend their reach into multithreaded environments by the use of templates.

Get Efficient C++ Performance Programming Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.