-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-124688: _decimal: Get a module state from ctx objects for performance #124691
Conversation
neonene
commented
Sep 27, 2024
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: _decimal: Store a module state in objects for faster access #124688
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! |