psf / psf/pyperf

Why is spawning a new process per benchmark more accurate?

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
962
Forks
106
Avg merge
2d 18h
Merged PRs (30d)
4

Description

I stumpled upon an explanation of the differences between timeit and pyperf here: https://pyperf.readthedocs.io/en/latest/cli.html#timeit-versus-pyperf-timeit

I am wondering why spawning a new process to benchmark is better?

Edit: I assume this has something to do with it? https://vstinner.github.io/journey-to-stable-benchmark-average.html

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked pyperf documentation section on timeit versus pyperf and the referenced article about stable benchmark averages. Determine what explanation is missing about process isolation, then update the relevant documentation so the accuracy rationale is clear and the links remain useful. Done means a reader can understand the trade-off without needing to ask this question.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, performance
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.