2 ms·
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 t
by tkinom 11y ago
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.