-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-108303: Move Lib/test/sortperf.py
to Tools/scripts
#114687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Which change (who) created this script? Is it @corona10? |
It was Guido 27 years ago: https://github.com/python/cpython/commits/main/Lib/test/sortperf.py I think he agreed on moving it away in Discord's #python-dev channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, the First thing we have to do is add the benchmark script, not remove the file.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
@corona10 ok, I will send a PR to pyperformance soon! 👍 |
Lib/test/sortperf.py
Lib/test/sortperf.py
to Tools/scripts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we just move the script into Tools/script
IMO pyperf based script is more modernized way and easy to compare with improvement patch. WDYT?
I agree with Guido: it is not really that useful as a benchmark (since it is a micro-benchmark). It is only interesting when working on So, I think that we can move this file for now. If someone has a real use-case for And for now this file would serve more like a history reference. |
Ah, I meant rewriting the benchmark script based on pyperf(you already did) and storing it Tools/script/, I did not mean to move new script to pyperformance, I also agree with Guido, it will not be a proper place. |
@corona10 sure! |
I will take a look at the PR by tomorrow :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- By default, all benchmark should be executed.
- Benchmarks needs some tune up
.....................
list_sort: Mean +- std dev: 30.8 ms +- 0.4 ms
.....................
list_sort_ascending: Mean +- std dev: 1.76 ms +- 0.10 ms
Execution time is too long :(
(Maybe we need to control inner_loops value)
@corona10 I've merged your suggestions. Thank you! I've also optimized the benchmark:
Is it good enough? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@sobolevn Feel free to merge the PR anytime!
@corona10 Thank you! 🎉 I think that we also need to backport this to 3.11 and 3.12 |
Yeah go a head |
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…onGH-114687) (cherry picked from commit f9154f8) Co-authored-by: Nikita Sobolev <[email protected]>
GH-115625 is a backport of this pull request to the 3.12 branch. |
…onGH-114687) (cherry picked from commit f9154f8) Co-authored-by: Nikita Sobolev <[email protected]>
GH-115626 is a backport of this pull request to the 3.11 branch. |
@corona10 what do you think about moving these case to
pyperformance
? Would it be benefitial?