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

GH-118093: Better handling of short and mid-loop traces by brandtbucher · Pull Request #122252 · python/cpython · GitHub

/ cpython Public

GH-118093: Better handling of short and mid-loop traces - #122252

Merged
brandtbucher merged 10 commits into
python:mainfrom
brandtbucher:tracing-jumps
Jul 29, 2024
Merged

GH-118093: Better handling of short and mid-loop traces#122252
brandtbucher merged 10 commits into
python:mainfrom
brandtbucher:tracing-jumps

Conversation

brandtbucher commented Jul 25, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

This makes two changes to trace projection:

  • Handle a single backward jump anywhere in a trace, rather than just at the beginning.
  • Rather than having a minimum trace length, just ensure that at least one instruction is fully translated. This prevents us from requiring the translation of several tiny instructions or "successfully" half-translating a large instruction.

Perf is neutral, but stats move in the right direction: 83% reduction in "inner loop found", 7% reduction in "trace too short", and 5% fewer optimization attempts overall. We execute 0.5% more uops and 0.5% fewer traces. 2% fewer tier one instructions executed overall.

brandtbucher added performance Performance or resource usage skip news interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jul 25, 2024
brandtbucher self-assigned this Jul 25, 2024

markshannon 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

A couple of questions

Comment thread Objects/genobject.c
Comment thread Python/optimizer.c Outdated

markshannon 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

Can you:

  • Go back to removing the asserts, and leave is_resume alone.
  • Add a comment linking to #122390

Consider it approved once you've done that

Comment thread Objects/genobject.c Outdated
Comment thread Objects/genobject.c

bedevere-app Bot commented Jul 29, 2024

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

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

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL