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

[3.11] GH-93516: Speedup line number checks when tracing. (GH-93763) by markshannon · Pull Request #94023 · python/cpython · GitHub

/ cpython Public

[3.11] GH-93516: Speedup line number checks when tracing. (GH-93763) - #94023

Closed
markshannon wants to merge 1 commit into
python:3.11from
faster-cpython:backport-93763
Closed

[3.11] GH-93516: Speedup line number checks when tracing. (GH-93763)#94023
markshannon wants to merge 1 commit into
python:3.11from
faster-cpython:backport-93763

Conversation

Copy link
Copy Markdown
Member
  • Use a lookup table to reduce overhead of getting line numbers during tracing.

Backport of #93763

)

* Use a lookup table to reduce overhead of getting line numbers during tracing.

markshannon commented Jun 20, 2022
edited
Loading

Copy link
Copy Markdown
Member Author

The ABI breakage is not really a break, as the new field is inserted (almost) at the end, after any other fields used in C extensions.

self.write(f".co_name = {co_name},")
self.write(f".co_qualname = {co_qualname},")
self.write(f".co_linetable = {co_linetable},")
self.write("._co_linearray = NULL,")

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

Sorry, unrelated question, but does this mean I need to add the field from my _co_code change here too?

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.

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

Technically, no. C will initialize any fields not explicitly mentioned to zero.
I think it is good practice to be explicit, though.

Copy link
Copy Markdown
Member

I will regenerate the ABI in this PR

Copy link
Copy Markdown
Member

@markshannon I cannot push to the remote repo, could you please ensure the "allow pushes from maintainers checkbox is activated on the right column"?

Copy link
Copy Markdown
Member Author

There is no "allow pushes from maintainers" checkbox.
Could you make a PR on this branch?

Copy link
Copy Markdown
Member Author

Closing in favour of #94127 to allow edits.

markshannon deleted the backport-93763 branch September 26, 2023 12:49
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.

4 participants


Back | FazBrowse Home | New Git URL