O'Reilly logo

Efficient C++ Performance Programming Techniques by David Mayhew, Dov Bulka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Key Points

  • Flexibility trades off with speed. As the power and flexibility of memory management increases, execution speed decreases.

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

  • Specialized memory managers can be more than an order of magnitude faster than the global one.

  • If you allocate mostly memory blocks of a fixed size, a specialized fixed-size memory manager will provide a significant performance boost.

  • A similar boost is available if you allocate mostly memory blocks that are confined to a single thread. A single-threaded memory manager will help by skipping over the concurrency issues that the global new() and delete() must handle.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required