Skip to content

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

Merged
markshannon merged 1 commit into
python:mainfrom
faster-cpython:convert-deopts-to-exits
Apr 24, 2024
Merged

markshannon merged 1 commit into
python:mainfrom
faster-cpython:convert-deopts-to-exits

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

2 participants