FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-111786: Use separate opcode vars for Tier 1 and Tier 2 by mdboom · Pull Request #112289 · python/cpython · GitHub

/ cpython Public

gh-111786: Use separate opcode vars for Tier 1 and Tier 2 - #112289

Merged
gvanrossum merged 2 commits into
python:mainfrom
mdboom:alternative-workaround
Nov 20, 2023
Merged

gh-111786: Use separate opcode vars for Tier 1 and Tier 2#112289
gvanrossum merged 2 commits into
python:mainfrom
mdboom:alternative-workaround

Conversation

mdboom commented Nov 20, 2023
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Suggested by @neonene: #111786 (comment)

This makes Windows about 3% faster on pyperformance benchmarks. See analysis here

This makes Windows about 3% faster on pyperformance benchmarks.
mdboom force-pushed the alternative-workaround branch from 27a5654 to f362f9a Compare November 20, 2023 20:26

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice, looks very straightforward.

Though based on our offline conversation, did you find out whether Windows PGO uses -E?

Comment thread Python/ceval.c Outdated
Comment on lines +692 to +693
uint8_t opcode; /* Current opcode */
int oparg; /* Current opcode argument, if any */

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Heh, I would have kept the comments at the same column, so you don't appear to be editing the oparg line. :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sure -- I think my editor did something magical.

Comment thread Python/ceval.c

mdboom commented Nov 20, 2023
edited
Loading

Copy link
Copy Markdown
Contributor Author

Though based on our offline conversation, did you find out whether Windows PGO uses -E?

I don't know, but I think that's orthogonal to this. Currently on the benchmarking infrastructure, we only pass the PYTHON_UOPS env variable to pyperformance, so it definitely has no effect during build. Independently of this, I measured what happens when you force Tier 2 on during the build, and it is about 1% faster.

Copy link
Copy Markdown
Member

Though based on our offline conversation, did you find out whether Windows PGO uses -E?

I don't know, but I think that's orthogonal to this. Currently on the benchmarking infrastructure, we don't pass the PYTHON_UOPS env variable to pyperformance, so it definitely has no effect during build.

Ah, sorry. Should I merge this then?

Independently of this, I measured what happens when you force Tier 2 on during the build, and it is about 1% faster.

1% faster than without Tier 2, or 1% faster than main?

mdboom commented Nov 20, 2023

Copy link
Copy Markdown
Contributor Author

Though based on our offline conversation, did you find out whether Windows PGO uses -E?

I don't know, but I think that's orthogonal to this. Currently on the benchmarking infrastructure, we don't pass the PYTHON_UOPS env variable to pyperformance, so it definitely has no effect during build.

Ah, sorry. Should I merge this then?

Yeah, I think that's fine.

Independently of this, I measured what happens when you force Tier 2 on during the build, and it is about 1% faster.

1% faster than without Tier 2, or 1% faster than main?

When you turn Tier 2 on during build (PGO collection), it's 1% faster than if you don't. (Using Tier 2 at runtime in both cases).

Copy link
Copy Markdown
Member

When you turn Tier 2 on during build (PGO collection), it's 1% faster than if you don't. (Using Tier 2 at runtime in both cases).

That's great news!

gvanrossum merged commit 6a00a58 into python:main Nov 20, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…on#112289)

This makes Windows about 3% faster on pyperformance benchmarks.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…on#112289)

This makes Windows about 3% faster on pyperformance benchmarks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL