News for hackers. Stuff that matters.
Re:Stack, Heap, Pool by tkinom on Monday September 14, 2015 @12:48PM (#10215993)
Did similar profiling with Borland/Turbo C++ a while back. (yes, I am that young. )

When I needed to alloc() 1-100 millions objects, the alloc, delete() api times did increase exponentially. BC++ profiler tracked that down to free list traversal.

Implemented my own version of pool with C++, and the new/delete time dropped down to constant times. Later one, I implemented a version on Linux (both in Kernel and User space + SMP) on faster CPU (1.5GHz) and get that API time down to sub micro-seconds measured with rdtsc.

It makes a huge difference for any code that need to alloc/delete millions+ objects as fast as possible.

There are no comments on this comment yet.