GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-108113: Make it possible to optimize an AST by iritkatriel · Pull Request #108282 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Aug 22, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: compile() with PyCF_ONLY_AST flag ignores the optimize arg #108113

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iritkatriel
pythongh-108113: Make it possible to optimize and AST
b214797
@iritkatriel
iritkatriel requested a review from markshannon as a code owner August 22, 2023 12:22
@bedevere-bot bedevere-bot mentioned this pull request Aug 22, 2023
compile() with PyCF_ONLY_AST flag ignores the optimize arg #108113
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Aug 22, 2023
@iritkatriel
iritkatriel requested a review from carljm August 22, 2023 12:23
@iritkatriel iritkatriel added the skip news label Aug 22, 2023
@iritkatriel

iritkatriel commented Aug 22, 2023

Copy link
Copy Markdown
Member Author

Skipping news as the previous PR's news covers this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm
carljm approved these changes Aug 22, 2023
View reviewed changes
Comment thread Python/bltinmodule.c Outdated
if (is_ast == -1)
goto error;
if (is_ast) {
PyArena *arena = _PyArena_New();

@carljm carljm Aug 22, 2023

Copy link
Copy Markdown
Member

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 does ast.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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iritkatriel reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Aug 22, 2023
@iritkatriel
do not allocate an arena for a NOP
37a52a6
carljm
carljm approved these changes Aug 23, 2023
View reviewed changes
@iritkatriel iritkatriel changed the title gh-108113: Make it possible to optimize and AST gh-108113: Make it possible to optimize an AST Aug 23, 2023
@iritkatriel
iritkatriel merged commit 2dfbd4f into python:main Aug 23, 2023
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting merge labels Aug 23, 2023
@bedevere-bot

bedevere-bot commented Aug 23, 2023

Copy link
Copy Markdown

There's a new commit after the PR has been approved.

@carljm: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from carljm August 23, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@carljm carljm Awaiting requested review from carljm

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@iritkatriel @bedevere-bot @carljm
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.