• Raymond Hettinger's avatar
    Fine tune the speed/space trade-off for overallocating small lists. · ab517d2e
    Raymond Hettinger authored
    The Py2.3 approach overallocated small lists by up to 8 elements.
    The last checkin would limited this to one but slowed down (by 20 to 30%)
    the creation of small lists between 3 to 8 elements.
    
    This tune-up balances the two, limiting overallocation to 3 elements
    (significantly reducing space consumption from Py2.3) and running faster
    than the previous checkin.
    
    The first part of the growth pattern (0, 4, 8, 16) neatly meshes with
    allocators that trigger data movement only when crossing a power of two
    boundary.  Also, then even numbers mesh well with common data alignments.
    ab517d2e
whatsnew24.tex 19.8 KB