• Tim Peters's avatar
    bpo-37029: keep usable_arenas in sorted order without searching (#13612) · 1c263e39
    Tim Peters authored
    This adds a vector of "search fingers" so that usable_arenas can be kept in sorted order (by number of free pools) via constant-time operations instead of linear search.
    
    This should reduce worst-case time for reclaiming a great many objects from O(A**2) to O(A), where A is the number of arenas.  See bpo-37029.
    1c263e39
2019-05-28-17-02-46.bpo-37029.MxpgfJ.rst 497 Bytes