This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Stefan Pochmann
Recipients Stefan Pochmann, rhettinger, tim.peters
Date 2020-02-29.18:24:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583000692.58.0.0936457437763.issue39801@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-02-29 18:24:52Stefan Pochmannsetrecipients: + Stefan Pochmann, tim.peters, rhettinger
2020-02-29 18:24:52Stefan Pochmannsetmessageid: <1583000692.58.0.0936457437763.issue39801@roundup.psfhosted.org>
2020-02-29 18:24:52Stefan Pochmannlinkissue39801 messages
2020-02-29 18:24:52Stefan Pochmanncreate