-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
gh-144569: Avoid creating temporary objects in BINARY_SLICE for bytes
#156318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Optimize ``BINARY_SLICE`` for :class:`bytes` by avoiding temporary | ||
| :class:`slice` object creation. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that we didn't test the optimizer in the previous PR. Could you please add a test like this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cocolato
Thank you. I hadn't seen the SC announcement when I opened this PR, and only found out about the JIT pause afterwards.
https://discuss.python.org/t/an-announcement-from-the-steering-council-regarding-the-jit-project/107638
This part is Tier 2 optimizer work, so I think it should stay on hold for now. I'll keep the non-JIT bytes fast path separate.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've confirmed this with the SC that the JIT part is just an extra branch change, so we can handle it in this PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for confirming. I've added the optimizer type-propagation test.