gh-124688: _decimal: Get a module state from ctx objects for performance#124691
gh-124688: _decimal: Get a module state from ctx objects for performance#124691vstinner merged 6 commits intopython:mainfrom neonene:decstate
Conversation
|
Do you have a benchmark showing the effect of this change? |
|
|
|
My different PGO builds says 3-5% faster on the |
Would you mind to share your results (before/after, difference)? |
|
On release builds, the result was as fast as the global state access: #123100 (comment) ( |
|
Picked a few a) main with d69529d restored (hard to evaluate main as-is) b) (a) with some patches c) (b) with 1 diff in |
|
Sorry, I don't know how to read your 6 benchmarks. I don't understand what you compared. I don't know what are "some patches" nor why you mention PyType_GetBaseByToken(), it doesn't help me to compare this PR. So I just compared the main branch to this PR: Nice! 1.09x faster is worth it. |
|
I added the skip news since Victor enabled auto-merge. If a NEWS entry is really needed, we can add it later in a separate commit though. |
|
Merged, thanks @neonene! |
Uh oh!
There was an error while loading. Please reload this page.