Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-108113: Make it possible to optimize an AST#108282
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
Skipping news as the previous PR's news covers this. |
Python/bltinmodule.c Outdated
@@ -804,25 +804,39 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename, | |||
if (is_ast == -1) | |||
goto error; | |||
if (is_ast) { | |||
PyArena *arena = _PyArena_New(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I wonder if anyone has perf-sensitive code that doesast.parse
on an AST as a no-op, and what the impact on that code will be of allocating and freeing an unused arena. Probably not an issue? I think it would be possible, but slightly more complex, to still avoid arena allocation in the no-op case.
bedevere-bot commentedAug 23, 2023
There's a new commit after the PR has been approved. @carljm: please review the changes made to this pull request. |
Uh oh!
There was an error while loading.Please reload this page.