Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs#118106

Merged
markshannon merged 1 commit into
python:mainpython/cpython:mainfrom
faster-cpython:convert-deopts-to-exitsfaster-cpython/cpython:convert-deopts-to-exitsCopy head branch name to clipboard
Apr 24, 2024
Merged

GH-118095: Convert DEOPT_IFs on likely side exits to EXIT_IFs#118106
markshannon merged 1 commit into
python:mainpython/cpython:mainfrom
faster-cpython:convert-deopts-to-exitsfaster-cpython/cpython:convert-deopts-to-exitsCopy head branch name to clipboard

Conversation

@markshannon

@markshannon markshannon commented Apr 19, 2024

Copy link
Copy Markdown
Member

Stats show about a 10% increase in traces executed and uops executed, with a corresponding reduction in tier 1 instructions executed.

@markshannon

Copy link
Copy Markdown
Member Author

CI failures are not new.

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, but what about the benchmark claiming it's 1% slower?

Comment thread Python/optimizer.c
// Reserve space for nuops (+ _SET_IP + _EXIT_TRACE)
int nuops = expansion->nuops;
RESERVE(nuops);
RESERVE(nuops + 1); /* One extra for exit */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm taking this is for gh-117434, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems likely to be the same issue, but I haven't checked.

@markshannon

Copy link
Copy Markdown
Member Author

LG, but what about the benchmark claiming it's 1% slower?

That's the tier 2 interpreter. The generated code for tier 1 is unchanged.

@markshannon markshannon merged commit 77cd042 into python:main Apr 24, 2024
@markshannon markshannon deleted the convert-deopts-to-exits branch August 6, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.