Skip to content

Conversation

@Gouvernathor
Copy link
Contributor

@Gouvernathor Gouvernathor commented Apr 3, 2023

See the benchmarks, this is supposed to be the best version performance-wise.
Only sorting the keys is quicker of course, but for that sorted should still be used.

I'm putting this so the tests can execute, but of course this is missing a news entry, a doc entry, a C equivalent, and for the purpose to be accepted - this is a proof-of-concept, mainly, even though I believe it's viable.

@Gouvernathor Gouvernathor requested a review from rhettinger as a code owner April 3, 2023 01:26
@bedevere-bot bedevere-bot mentioned this pull request Apr 3, 2023
@Gouvernathor Gouvernathor marked this pull request as draft April 3, 2023 01:27
@rhettinger rhettinger changed the title gh-103202: Implement OrderedDict.sort gh-103202: Proof of concept: OrderedDict.sort() Apr 3, 2023
@rhettinger rhettinger added 3.12 only security fixes performance Performance or resource usage DO-NOT-MERGE stdlib Standard Library Python modules in the Lib/ directory labels Apr 3, 2023
Copy link
Member

@sunmy2019 sunmy2019 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your change won't apply for most cases (you can should add a test case to verify, though). You need to modify Objects/odictobject.c as well.

@rhettinger rhettinger closed this May 27, 2023
@Gouvernathor Gouvernathor deleted the patch-3 branch June 4, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.12 only security fixes awaiting core review DO-NOT-MERGE performance Performance or resource usage stdlib Standard Library Python modules in the Lib/ directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants