gh-108303: Move Lib/test/sortperf.py to Tools/scripts#114687
gh-108303: Move Lib/test/sortperf.py to Tools/scripts#114687sobolevn merged 8 commits intopython:mainfrom
Lib/test/sortperf.py to Tools/scripts#114687Conversation
|
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. |
corona10
left a comment
There was a problem hiding this comment.
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.pyLib/test/sortperf.py to Tools/scripts
corona10
left a comment
There was a problem hiding this comment.
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.
- 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? |
|
@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 <mail@sobolevn.me>
|
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 <mail@sobolevn.me>
|
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?