May 2, 2006
Post comments count0
Post likes count0

A cache with a bad policy is another name for a memory leak

Raymond Chen
Raymond Chen

A common performance trick is to reduce time spent in the heap manager by caching the last item freed (or maybe the last few) so that a subsequent allocation can just re-use the item rather than having to go make a new one. But you need to be careful how you do this or you can end up making things worse rather than better. Here's an example motiva...

Code