Message363001
Good point, Tim. Although binarysort really moves very few slots (I think at most 62, and average like 13). That might not be representative for how people use list.insert, either. I think I mainly use it for the mentioned case of a "self-sorting list", either naively via bisect.insort with a single list or via sortedcontainers' SortedList using multiple lists (used it only once so far). If I'm not mistaken, SortedList has a default load factor of 1000 and splits at double that size.
I might do more reasonable benchmarks later (haven't read Raymond's reply yet).
In any case, binarysort does its own inserting, so at least it wouldn't be affected if list.insert were changed. |
|
Date |
User |
Action |
Args |
2020-02-29 18:24:52 | Stefan Pochmann | set | recipients:
+ Stefan Pochmann, tim.peters, rhettinger |
2020-02-29 18:24:52 | Stefan Pochmann | set | messageid: <1583000692.58.0.0936457437763.issue39801@roundup.psfhosted.org> |
2020-02-29 18:24:52 | Stefan Pochmann | link | issue39801 messages |
2020-02-29 18:24:52 | Stefan Pochmann | create | |
|