Repository navigation
Major slowdown on large listcomp #117108
Copy link
Copy link
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagerelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errorinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
on Mar 21, 2024 It looks like the regression is due to 1530932 / #116206 cc @markshannon
Reacted by Tim PetersThanks - at least the cause is obvious 😆.,
Noting that, in the original program that triggered this, disabling gc restored its former speed.
- added and removedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Mar 21, 2024 - addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Mar 22, 2024 - added a commit that references this issue
on Mar 22, 2024 - added a commit that references this issue
on Mar 26, 2024 It was fixed by #117120
Reacted by Victor Stinner and bluss- moved this from Todo to Done in Release and Deferred blockers 🚫
on Mar 26, 2024 - added 2 commits that reference this issue
on Apr 2, 2024
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagerelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Bug report
Bug description:
That started within the last 48 hours, on the main branch. Here's test code; it's possible it could be simplified
Under 3.12.2 it takes about a second, but under current main about 21 seconds.
If the size of the list is increased, it appears to suffer much worse than linear-time slowdown.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs