python / python/pyperformance

unpack_sequence benchmark too fast on modern computers

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

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
203
Avg merge
1h 20m
Merged PRs (30d)
2

Description

On modern computers, unpack_sequence completes in nanoseconds (!!!).

This is basically within the range of noise for modern computers. The cause is that for some reason, the inner loops are hardcoded instead of letting pyperf decide

https://github.com/python/pyperformance/blob/main/pyperformance/data-files/benchmarks/bm_unpack_sequence/run_benchmark.py#L457

The fix is simple: just remove the inner_loops argument. However, fixing this would need a major version bump, as all past unpack sequence results would be invalidated.

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

Open pyperformance/data-files/benchmarks/bm_unpack_sequence/run_benchmark.py around line 457 and inspect the hardcoded inner_loops argument. Remove that argument so pyperf can choose the loop count, then verify the unpack_sequence benchmark timing and account for the required major version bump because prior results become invalid.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.