• antirez's avatar
    Use a free list for EMBSTR objects creation / release. · 19f735ce
    antirez authored
    To my surprise, mantaining a small poll of objects provides a very big
    speedup even when the jemalloc allocator is used, which is supposed to
    have arenas doing mostly the same work.
    
    Probably this is a combination of different factors:
    
    1) No need to manage zmalloc total memory used.
    2) No locking of any kind because we can assume single thread, so
       maintaining the free list may be cheaper for us compared to
       jemalloc.
    3) More locality because of a different cache/reuse pattern?
    19f735ce
object.c 23.6 KB