-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
sortperf.py
is broken
#116576
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
Labels
type-bug
An unexpected behavior, bug, or error
Comments
sobolevn
added a commit
to sobolevn/cpython
that referenced
this issue
Mar 10, 2024
Indeed, thanks for noticing! 👍 |
sobolevn
added a commit
that referenced
this issue
Mar 11, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Mar 11, 2024
pythonGH-116577) (cherry picked from commit 4704e55) Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Mar 11, 2024
pythonGH-116577) (cherry picked from commit 4704e55) Co-authored-by: Nikita Sobolev <[email protected]>
This was referenced Mar 11, 2024
Thanks, looks alright now, both the code fix and the times in the PR comment. |
adorilson
pushed a commit
to adorilson/cpython
that referenced
this issue
Mar 25, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
It's supposed to measure sort speed for different kinds of data, from best to worst case. But currently it shows about the same speed for all kinds, because the same list object is sorted a thousand times. Which means all but the first sort are just sorting the already sorted list. And that dominates the total time, making the first=real sort insignificant.
Oddly it was specifically changed to be this way, here, from
to:
There was even a comment showing that all cases from best to worst now take about the same tiny time 29.2 us, calling it an optimization (and I think it refers to the above change). So is this intentional/desired? I highly doubt that, but if it's a mistake, it's really weird.
The whole update was btw called "Move Lib/test/sortperf.py to Tools/scripts", but in reality it wasn't just moved but completely rewritten. I don't think that was good, in my opinion moves should just be moves, not hide massive changes.
@sobolevn @tim-one
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Tools/scripts/sortperf.py
sorting the same list #116577Tools/scripts/sortperf.py
sorting the same list (GH-116577) #116582Tools/scripts/sortperf.py
sorting the same list (GH-116577) #116583The text was updated successfully, but these errors were encountered: