GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add an asv benchmark suite by eriknw · Pull Request #596 · python-graphblas/python-graphblas

Conversation

@eriknw

@eriknw eriknw commented Aug 4, 2026

Copy link
Copy Markdown
Member

101 benchmarks over the library's hot paths: scalar access (getitem, get and
contains on hit and miss, setitem), index parsing, small-op overhead on
10/100/1000-element objects, large kernels at ~1e6 nnz (mxm, mxv, ewise,
reduce, single-threaded via OMP_NUM_THREADS=1), coo/dense/scipy conversions,
cold import and first-use timings in fresh subprocesses, and repr costs.

benchmarks/_verify.py is a standalone checker rather than an asv benchmark:
it imports every module the way asv does and calls each benchmark once across
all parameter combinations. It reports 101 passed, 0 failed, 0 skipped. No
timing numbers are claimed; what this commit establishes is that the
benchmarks exist and run.

asv.conf.json uses // comments. That is asv's own documented config
format and its loader strips them, but the repo's check-json hook is a
strict JSON parser and rejects the file, so that one path is excluded from
the hook and the hook's stale "no JSON files yet" comment is replaced.
Verified with pre-commit run check-json --all-files, which passes.

Two alternatives were considered and not taken. Renaming to asv.conf.jsonc
needs no exclude and asv 0.6.5 does resolve it (Config.load accepts
.json and .jsonc), but asv is not a pinned dependency here and older
versions look only for the .json name, which would fail as "No asv.conf
file found". Stripping the comments would delete the only explanation of why
each setting is set as it is. The exclude names the single path, so every
other JSON file is still checked.

asv is deliberately not added to dev-requirements.txt or environment.yml.
Nothing in the test suite or CI invokes it, and this repo ties dependency
changes to scripts/check_versions.sh and the CI version pools, which a
benchmarks-only change should not be editing. The README carries the
pip install asv line and the reasoning. CI wiring is also left alone: a
weekly cron on a fixed machine suits asv far better than per-PR runs on
shared runners.

The lint configuration for benchmarks/ rides in this commit because the
directory it configures arrives here: flake8 and ruff ignore B015/B018
(a bare expression IS what an asv benchmark measures) and T201 for the
benchmark CLI, and codespell learns "bu".


Stack created with GitHub Stacks CLI • Give Feedback 💬

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eriknw
eriknw marked this pull request as ready for review August 4, 2026 16:07
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from 0610f1d to 8120ea8 Compare August 4, 2026 16:12
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch 2 times, most recently from a9630c5 to 871707e Compare August 5, 2026 03:18
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from 871707e to 48c0a37 Compare August 5, 2026 17:44
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from 48c0a37 to 0b7a63a Compare August 5, 2026 18:03
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch 2 times, most recently from 2241c0d to f28bd3e Compare August 6, 2026 07:59
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from f28bd3e to 0a586c9 Compare August 6, 2026 15:39
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch 3 times, most recently from e469e6c to ced8b66 Compare August 6, 2026 20:41
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from ced8b66 to 80d325e Compare August 7, 2026 02:48
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from 80d325e to dfa59f3 Compare August 7, 2026 05:09
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from dfa59f3 to 0510efb Compare August 26, 2026 17:30
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from 0510efb to 3029f1c Compare September 18, 2026 03:09
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from 3029f1c to ea554c2 Compare September 18, 2026 03:46
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch 4 times, most recently from a3272da to a1bfea7 Compare October 1, 2026 17:10
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from a1bfea7 to 6168be8 Compare October 1, 2026 17:11
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch 2 times, most recently from 3283cea to a10ff8a Compare October 3, 2026 04:57
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch 2 times, most recently from 60cc74c to c6677b0 Compare October 4, 2026 06:21
@eriknw
eriknw removed this pull request from stack #634 October 8, 2026 21:02
@eriknw
eriknw changed the base branch from 15-udt-division-semantics to 11-udt-record-leaf-count October 8, 2026 21:24
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from c6677b0 to 7d2e820 Compare October 8, 2026 21:40
@eriknw
eriknw added this pull request to stack #635 October 8, 2026 21:46
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch 3 times, most recently from adcf4a4 to f2b77a4 Compare October 14, 2026 18:45
@eriknw
eriknw removed this pull request from stack #635 October 19, 2026 07:45
@eriknw
eriknw changed the base branch from 11-udt-record-leaf-count to main October 19, 2026 07:47
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from f2b77a4 to 6a525e3 Compare October 19, 2026 07:47
@eriknw
eriknw changed the base branch from main to 17-viz-fixes October 19, 2026 07:49
@eriknw
eriknw added this pull request to stack #650 October 19, 2026 07:50
@eriknw
eriknw force-pushed the 16-asv-benchmarks branch from 6a525e3 to b0d1ee5 Compare October 19, 2026 07:55
@codecov

codecov Bot commented Oct 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.95%. Comparing base (5ddf2c7) to head (cf3ce60).

Additional details and impacted files
@@               Coverage Diff                @@
##           17-viz-fixes     #596      +/-   ##
================================================
+ Coverage         98.26%   98.95%   +0.68%     
================================================
  Files               109      109              
  Lines             34838    34838              
  Branches           3997     3997              
================================================
+ Hits              34235    34474     +239     
+ Misses              340      234     -106     
+ Partials            263      130     -133     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eriknw eriknw mentioned this pull request Oct 28, 2026
Test what main's coverage misses, and exclude what no input reaches #656
Open
@eriknw
Add an asv benchmark suite
a6ed98b
101 benchmarks over the library's hot paths: scalar access (getitem, get and
contains on hit and miss, setitem), index parsing, small-op overhead on
10/100/1000-element objects, large kernels at ~1e6 nnz (mxm, mxv, ewise,
reduce, single-threaded via OMP_NUM_THREADS=1), coo/dense/scipy conversions,
cold import and first-use timings in fresh subprocesses, and repr costs.

`benchmarks/_verify.py` is a standalone checker rather than an asv benchmark:
it imports every module the way asv does and calls each benchmark once across
all parameter combinations. It reports 101 passed, 0 failed, 0 skipped. No
timing numbers are claimed; what this commit establishes is that the
benchmarks exist and run.

`asv.conf.json` uses `//` comments. That is asv's own documented config
format and its loader strips them, but the repo's `check-json` hook is a
strict JSON parser and rejects the file, so that one path is excluded from
the hook and the hook's stale "no JSON files yet" comment is replaced.
Verified with `pre-commit run check-json --all-files`, which passes.

Two alternatives were considered and not taken. Renaming to `asv.conf.jsonc`
needs no exclude and asv 0.6.5 does resolve it (`Config.load` accepts
`.json` and `.jsonc`), but asv is not a pinned dependency here and older
versions look only for the `.json` name, which would fail as "No `asv.conf`
file found". Stripping the comments would delete the only explanation of why
each setting is set as it is. The exclude names the single path, so every
other JSON file is still checked.

asv is deliberately not added to `dev-requirements.txt` or `environment.yml`.
Nothing in the test suite or CI invokes it, and this repo ties dependency
changes to `scripts/check_versions.sh` and the CI version pools, which a
benchmarks-only change should not be editing. The README carries the
`pip install asv` line and the reasoning. CI wiring is also left alone: a
weekly cron on a fixed machine suits asv far better than per-PR runs on
shared runners.

The lint configuration for benchmarks/ rides in this commit because the
directory it configures arrives here: flake8 and ruff ignore B015/B018
(a bare expression IS what an asv benchmark measures) and T201 for the
benchmark CLI, and codespell learns "bu".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@eriknw
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.