Skip to content

Commit 64da717

Browse files
committed
add pyperformance information
1 parent d94d590 commit 64da717

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

peps/pep-0830.rst

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,31 @@ Performance Measurements
202202

203203
The pyperformance suite has been run on the merge base, on the PR branch with
204204
the feature disabled, and on the PR branch with the feature enabled in both
205-
``ns`` and ``iso`` modes.
205+
``us`` and ``iso`` modes.
206206

207-
TODO(@gpshead): summarize results of the most recent run here.
207+
There were no significant performance changes observed by this author. Just
208+
occasional varying 1-2% measurement noise that could not be reliably
209+
reproduced. Below the benchmarking setup noise threshold as far as the author
210+
is concerned.
208211

209-
TODO(@gpshead): Do another run with the feature enabled but without the StopIteration special case to demonstrate why that choice was made.
212+
What about the special case performance optimiaztion? If I omit the two line
213+
special case to avoid collecting timestamps on ``StopIteration`` and
214+
``StopAsyncIteration`` in ``Objects/exception.c``, only a single benchmark
215+
showed a regression: ``async_generators``. That one would reliably run on the
216+
order of 10% slower without that optimization. It is likely effectively a
217+
microbenchmark that does not reflect most application behavior. Regardless, it
218+
demonstrates the importance of that optimization.
210219

220+
I used ``configure --enable-optimizations`` builds for my benchmarks and ran
221+
them using commands such as:
222+
223+
.. code-block:: text
224+
225+
pyperformance run -p baseline-3a7df632c96/build/python -o baseline-eopt.json
226+
pyperformance run -p traceback-timestamps/build/python -o traceback-timestamps-default-eopt.json
227+
PYTHON_TRACEBACK_TIMESTAMPS=1 pyperformance run --inherit-environ PYTHON_TRACEBACK_TIMESTAMPS -p traceback-timestamps/build/python -o traceback-timestamps-env=1-eopt.json
228+
PYTHON_TRACEBACK_TIMESTAMPS=iso pyperformance run --inherit-environ PYTHON_TRACEBACK_TIMESTAMPS -p traceback-timestamps/build/python -o traceback-timestamps/Results.silencio/traceback-timestamps-env=iso-eopt.json
229+
PYTHON_TRACEBACK_TIMESTAMPS=1 pyperformance run --inherit-environ PYTHON_TRACEBACK_TIMESTAMPS -p traceback-timestamps-without-StopIter-cases/build/python -o traceback-timestamps/Results.silencio/traceback-timestamps-without-StopIter-cases-env=1-eopt.json
211230
212231
213232
Backwards Compatibility

0 commit comments

Comments
 (0)