Uh oh!
There was an error while loading. Please reload this page.
gh-108303: Move Lib/test/sortperf.py to Tools/scripts - #114687
Conversation
vstinner
commented
Jan 29, 2024
Which change (who) created this script? Is it @corona10? |
sobolevn
commented
Jan 29, 2024
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 |
sobolevn
commented
Jan 29, 2024
@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. |
sobolevn
commented
Feb 10, 2024
@corona10 sure! |
corona10
commented
Feb 11, 2024
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)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
sobolevn
commented
Feb 15, 2024
@corona10 I've merged your suggestions. Thank you! I've also optimized the benchmark: Is it good enough? |
sobolevn
commented
Feb 18, 2024
@corona10 Thank you! 🎉 I think that we also need to backport this to 3.11 and 3.12 |
corona10
commented
Feb 18, 2024
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?