It’s important to understand the cost of memory allocations, but this cost can be surprisingly tricky to measure. It seems reasonable to measure this cost by wrapping calls to new[] and delete[] with timers. However, for large buffers these timers may miss over 99% of the true cost of these operations, and these hidden costs are larger than I had expected.
more here...........http://randomascii.wordpress.com/2014/12/10/hidden-costs-of-memory-allocation/
more here...........http://randomascii.wordpress.com/2014/12/10/hidden-costs-of-memory-allocation/