Skip to content

DEV: add spin bench command for local benchmarks - #159

Merged
seberg merged 5 commits into
numpy:mainfrom
naseweisssss:codex/fix-spin-bench
Oct 5, 2026
Merged

seberg merged 5 commits into
numpy:mainfrom
naseweisssss:codex/fix-spin-bench

Conversation

@naseweisssss

@naseweisssss naseweisssss commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

This is aimed to solve: #123. Added a minimal spin bench to build the local checkout and run the existing ASV benchmarks.

Verified the full benchmark and benchmark selection, including that ASV imports the local build

Benchmark validation

Ran:

spin bench -t Npv2D.time_broadcast

All 27 parameter combinations completed successfully.

Selected results (timing uncertainty omitted):

Cash-flow sequences Payments per sequence Interest rates Time
1 1 1 8.90 µs
10 10 10 26.8 µs
100 100 100 20.0 ms

Tested on Windows with Python 3.13.15, Spin 0.18, and ASV 0.6.6. Verified that ASV imports the local build.

These results validate the existing npv benchmark through the new command; they do not demonstrate a performance improvement.

naseweisssss and others added 2 commits October 4, 2026 23:01
Co-authored-by: Inessa Pawson <inessapawson@gmail.com>
Co-authored-by: Inessa Pawson <inessapawson@gmail.com>
Comment thread .spin/cmds.py Resolved

@InessaPawson InessaPawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up, @naseweisssss! Nice work!
One more inline comment to address. Also, the prefix DEV fits this PR better than BUG.

Co-authored-by: Inessa Pawson <inessapawson@gmail.com>
@naseweisssss naseweisssss changed the title BUG: add spin bench command for local benchmarks DEV: add spin bench command for local benchmarks Oct 4, 2026

@seberg seberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and seems to all work as advertised and the biggest nit I found is that the lines could be wrapped nicer in the markdown.

Thanks, @naseweisssss, let's get it in!

@seberg
seberg merged commit 90e1ed1 into numpy:main Oct 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants