Uh oh!
There was an error while loading. Please reload this page.
gh-132042: Remove resolve_slotdups to speedup class creation - #132156
Conversation
StanFromIreland
commented
Apr 6, 2025
Maybe take a look at this comment and have it in mind. |
sergey-miryanov
commented
Apr 6, 2025
@StanFromIreland Yeah, thanks! I just checked both scripts - and timing closely same. But I not finished main task, so results can changed. |
Uh oh!
There was an error while loading. Please reload this page.
Intermediate results: Benchmark results (outdated) |
I added tests from gh-76527 (script for testing with pyperf b.txt):
Benchmark results (outdated)Also benchgcclasses2.py output: new: Time varies, I'm not sure it is statistically significant. Count of objects closely the same. Async import time ( new: |
Remove resolve_slotdups (new2): Benchmark results (outdated) |
sergey-miryanov
commented
Apr 9, 2025
It is ready to review. Please take a look. |
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
sergey-miryanov
commented
Jun 24, 2025
Fixed merge conflicts. Updated results: Geometric mean - 1.12x faster |
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.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
…sergey-miryanov/cpython into pythongh-132042-optimize-class-creation
sergey-miryanov
commented
Oct 1, 2025
@kumaraditya303@vstinner Thanks for review! I will be able to run benchmarks after updates on this weekends (now on traveling laptop). |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. A few coding style suggestions.
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.
Co-authored-by: Victor Stinner <vstinner@python.org>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
sergey-miryanov
commented
Oct 3, 2025
@kumaraditya303 thanks! |
vstinner
commented
Oct 3, 2025
Micro-benchmark on creating on empty class: Result: |
Uh oh!
There was an error while loading. Please reload this page.
vstinner
commented
Oct 3, 2025
Merged. Thank you, that's a nice performance enhancement! |
bedevere-bot
commented
Oct 3, 2025
|
sobolevn
commented
Oct 3, 2025
Congrats, very useful speedup! |
sergey-miryanov
commented
Oct 3, 2025
Thanks everyone! |
…ython#132156) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Uh oh!
There was an error while loading. Please reload this page.
Removes resolve_slotdups.