Table of Contents

Benchmark snapshot — 2026-08-29 · 9b200075

Official NumSharp-vs-NumPy comparison with Managed C# / OpenBLAS profiles and complementary subsystems, persisted for provenance. Auto-generated by benchmark/scripts/snapshot_history.py.

Provenance

Run timestamp 20260829-005949
Git HEAD 9b200075 — docs(skill): document master-code-data dashboard-data deliv…
Working tree DIRTY — benchmarked HEAD + uncommitted changes: test/NumSharp.Tests.Build.Analyzer/NumSharp.Tests.Build.Analyzer.csproj
Date 2026-08-29

Environment

CPU 13th Gen Intel Core i9-13900K
OS Windows 11 (10.0.26200)
.NET SDK 10.0.101 (net10.0, Release)
Python 3.12.12
NumPy 2.4.2

Convention

Ratio = NumPy_ms ÷ NumSharp_ms (NPY/NS) → >1.0× = NumSharp faster (higher is better).

Methodology

  • C#: BenchmarkDotNet, OfficialBenchmarkConfig — InProcessEmit toolchain, 50 measured iterations / 5 warmup, iteration time capped at 25 ms. MemoryDiagnoser on.
  • NumPy: time-budgeted per op — a ~200 ms window (a >20 ms/call op runs exactly 100 times), 10 warmup (warm long-lived interpreter).
  • Timing basis: best window (min) of each side's per-case sweep — min-based harnesses run each case to a ~200 ms time budget (a >20 ms/call op runs exactly 100 times); the C# op-matrix keeps BenchmarkDotNet's 50 iterations. merge-results.py compares the mins; per-case means are retained in the JSON (numpy_mean_ms/numsharp_mean_ms) as interference/tail diagnostics.
  • Sizes: 1,000 / 100,000 / 10,000,000 elements. Same seeds both sides.
  • Join keyed on (op, dtype, N, scenario); effective timing is the fastest valid backend profile.
  • Availability: MissingBackendException and NotSupportedException are recorded, never timed.
  • Backend profiles: Managed C# and OpenBLAS are merged into the canonical matrix.
  • Subsystems appended to benchmark-report.md: NDIter, Layout, Operand, Cast, Fusion.

NDIter: HEADLINE — operation matrix: 1.46× geomean · 69%🕐 of NumPy's time · 108 win / 57 lose over 165 cells

Cast: 381 / 1568 comparable cells lag (<1.0); 1187 win (≥1.0).

Files

file what
benchmark-report.md backend-aware op matrix + appended complementary subsystems
benchmark-report.json / .csv combined backend-aware machine-readable / spreadsheet form
benchmark-report.managed.json / .openblas.json separate profile measurements using the same schema
numpy-results.json raw NumPy timings (merge input)
nditer_results.* + cards/ iterator benchmark sheet + summary cards (ops/cat)
layout_/operand_/cast_/fusion_/openblas_results.* complementary subsystem sheets and targeted backend profiles

Raw BenchmarkDotNet per-class JSON (~tens of MB) is not persisted here (regenerable). Reproduce with python benchmark/run_benchmark.py.