Measuring C++ Allocator Performance

When taking the performance of heap_pool as the baseline, the picture painted is mostly the same:

Average system + user time, compared to malloc/free

Average system time, compared to malloc/free

The system time graph in particular demonstrates quite clearly the benefit of avoiding system calls for some value type sizes. Oddly enough, even at 64 Bytes, the size-based approach outperforms raw heap allocations — I have no explanation for that phenomenon1.

  1. And admittedly, I’m too lazy to look into it. All I can say is that the performance test code very definitely only optimizes up to 32 Byte-sized value types []

Pages: 1 2 3 4 5

Comments are closed.

Copyright © 2007 - 2018 by the respective authors.
Permission to use the image of Great Cthulhu has kindly been granted by F. Launet/Goomi Studio.
Other content on this website is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.0 Germany License.
Creative Commons License

Blog directory