GH-87849: Simplify stack effect of SEND and specialize it for generators.#101788
Merged
markshannon merged 6 commits intopython:mainfrom Feb 13, 2023
Merged
GH-87849: Simplify stack effect of SEND and specialize it for generators.#101788markshannon merged 6 commits intopython:mainfrom
markshannon merged 6 commits intopython:mainfrom
Conversation
iritkatriel
approved these changes
Feb 13, 2023
carljm
added a commit
to carljm/cpython
that referenced
this pull request
Feb 13, 2023
* main: pythongh-101810: Remove duplicated st_ino calculation (pythonGH-101811) pythongh-92547: Purge sqlite3_enable_shared_cache() detection from configure (python#101873) pythonGH-100987: Refactor `_PyInterpreterFrame` a bit, to assist generator improvement. (pythonGH-100988) pythonGH-87849: Simplify stack effect of SEND and specialize it for generators and coroutines. (pythonGH-101788) Correct trivial grammar in reset_mock docs (python#101861) pythongh-101845: pyspecific: Fix i18n for availability directive (pythonGH-101846) pythongh-89792: Limit test_tools freeze test build parallelism based on the number of cores (python#101841) pythongh-85984: Utilize new "winsize" functions from termios in pty tests. (python#101831) pythongh-89792: Prevent test_tools from copying 1000M of "source" in freeze test (python#101837) Fix typo in test_fstring.py (python#101823) pythonGH-101797: allocate `PyExpat_CAPI` capsule on heap (python#101798) pythongh-101390: Fix docs for `imporlib.util.LazyLoader.factory` to properly call it a class method (pythonGH-101391)
Contributor
|
FYI: I'm getting a refleak on |
Member
Author
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This avoids most the overhead when transferring control from caller to the generator or coroutine in a
yield fromorawait.The benchmarks results are in the noise, except for the "generators" benchmark which is 2.5x faster.
Mean speedup is about 1%, although that might not be meaningful if one benchmark is 150% faster.
https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20230210-3.12.0a5%2B-685d559/bm-20230210-linux-x86_64-faster%252dcpython-specialized_send-3.12.0a5%2B-685d559-vs-base.md