Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
bpo-46841: Quicken code in-place#31888
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
brandtbucher commentedMar 16, 2022
1% perf improvement too: Details |
Uh oh!
There was an error while loading.Please reload this page.
markshannon commentedMar 17, 2022
This is still marked as draft, what is left to do? |
brandtbucher commentedMar 17, 2022
There is still an awkward spot in I’m still trying to understand the code better and figure out a cleaner way of doing this. Any ideas? |
brandtbucher commentedMar 17, 2022
#31968 should help. |
markshannon commentedMar 18, 2022
I think it is OK to sort out the peculiarities of |
bedevere-bot commentedMar 18, 2022
🤖 New build scheduled with the buildbot fleet by@brandtbucher for commitc8054b9 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
markshannon commentedMar 21, 2022
Buildbot failures are all pre-existing failures and unrelated to this PR. |
Uh oh!
There was an error while loading.Please reload this page.
This moves the bytecode to the end of the corresponding
PyCodeObject, and quickens it in-place.Related changes:
PyCodeObjectis now more compact. I've removed the almost-always-unusedco_varnames,co_freevars, andco_cellvarsmember caches, and rearranged someintmembers to fill some holes in the struct on 64-bit builds.co_codehas been removed and replaced with_PyCode_GetCode, andco_quickenedandco_firstinstrhave been replaced with_PyCode_CODE._PyOpcode_Deoptis a new mapping from all opcodes to their un-quickened forms._PyOpcode_InlineCacheEntriesis renamed to_PyOpcode_Caches,_Py_IncrementCountAndMaybeQuickenis renamed to_PyCode_Warmup,_Py_Quickenis renamed to_PyCode_Quicken, and_co_quickenedis renamed to_co_code_adaptive(and is now a read-onlymemoryview).https://bugs.python.org/issue46841