@nedbatNed Batchelder wow. Trying it on a very small pure Python lib (inifix), branch coverage on:
coverage 7.6.11 (default): ~3s
coverage 7.6.11 (COVERAGE_CORE=sysmon): ~1.5s
coverage 7.7.0 (COVERAGE_CORE=sysmon): ~<1.0s
without coverage, the test suite runs in about 800ms, so the overhead needed to measure coverage went from ~275% to a measly 25%.
![Benchmark output of both versions.
❯ hyperfine \
--prepare "python3.14 -m pip install 'coverage<7.7'" \
"COVERAGE_CORE=sysmon python3.14 -m pytest --cov PIL --cov Tests" \
--command-name coverage-7.6 \
--prepare "python3.14 -m pip install 'coverage>=7.7'" \
"COVERAGE_CORE=sysmon python3.14 -m pytest --cov PIL --cov Tests" \
--command-name coverage-7.7 \
--runs 2
Benchmark 1: coverage-7.6
Time (mean ± σ): 107.346 s ± 0.398 s [User: 94.429 s, System: 10.319 s]
Range (min … max): 107.064 s … 107.627 s 2 runs
Benchmark 2: coverage-7.7
Time (mean ± σ): 44.281 s ± 0.547 s [User: 32.046 s, System: 10.382 s]
Range (min … max): 43.894 s … 44.668 s 2 runs
Summary
coverage-7.7 ran
2.42 ± 0.03 times faster than coverage-7.6
❯ python3.14 --version
Python 3.14.0a6](https://files.mastodon.social/media_attachments/files/114/184/030/105/487/139/original/38e0dc420025b1c2.png)