Table of Contents
NumSharp performance lab

Benchmark Dashboard

A compact operating view of the NumSharp vs NumPy benchmark suite: 18 official op suites, all supported dtypes where applicable, three cache tiers, and six complementary scans for iterator, layout, operand, cast, fusion, and native OpenBLAS/LAPACK behavior.

Snapshot 2026-08-24 Commit 938d0449 NumPy 2.4.2 Ratio NumPy / NumSharp
API coverage
98.7%

455 / 461 benchmarkable NumSharp-compatible APIs have benchmark evidence

Effective geomean

Best valid implementation selected per comparable cell

Backends Supported
2/2

Managed C# Native Backend
OpenBLAS Backend

Cast subsystem
1,187

wins out of 1,568 comparable cast cells

Operation cells

Legend & How To Read

Benchmark row
Each result is one operation x dtype x size timing cell from the latest benchmark snapshot; rollups use comparable measured rows.
Timing fields
Ratios come from raw NumPy_ms and NumSharp_ms timings. A value above 1.00x is a NumSharp win; below 1.00x means NumPy was faster.
Drill-down
Click Status Mix segments, Suite Scoreboard rows, and Dtype Heatmap cards to open the first 25 best and worst benchmark rows; use Load More to reveal the rest.

Cell

One benchmark row: operation, dtype, and size tier. The dashboard uses best timed runs after warmup. Allocation-heavy families retain the 10M tier label while both NumPy and NumSharp use a symmetric 1M physical-work cap; 1M is not a separate dashboard tier.

Reading Ratios

Ratio is NumPy / NumSharp. Higher is better: 3.00x means NumSharp took 10s while NumPy took 30s; 0.50x means NumSharp takes about twice as long.

Performance Bands

Faster: 1.05x and above Close: 0.80x to 1.05x Slower: 0.33x to 0.80x Much slower: below 0.33x No data: pending C# measurement

Status Mix

Credible rows are grouped by NumPy / NumSharp ratio; negligible and no-data cells are separate

4 x100+ faster 933 faster, 1.05-100x 523 close, 0.80-1.05x 954 slower, 0.33-0.80x 516 much slower, <0.33x Negligible Failed 63 no data

Suite Scoreboard

Geomean across credible rows. Parity marker is 1.0x.

Statistics 2.24x 39 / 10
Reduction 1.81x 385 / 110
Broadcasting 1.10x 3 / 0
Sorting 1.08x 23 / 13
Creation 1.04x 23 / 21
Unary 0.83x 93 / 120
Arithmetic 0.80x 145 / 197
Selection 0.76x 2 / 4
Logic 0.68x 14 / 25
Comparison 0.64x 17 / 31
Linear algebra 0.57x 2 / 6
Bitwise 0.54x 45 / 68
Manipulation 0.40x 1 / 1

Dtype Heatmap

Credible operation-matrix rows by dtype and cache tier

Subsystem Signals

Result models that the op matrix cannot express

NDIter

1.46x

Iterator operation geomean across 165 comparable cells: 108 wins and 57 losses, with no sections excluded by the access-violation policy.

Layout

0.54-9.24x

Published geomeans by layout span 0.54x to 9.24x: large copy and elementwise paths win, while strided/broadcast reductions and decimal sums trail.

Cast

1,187 wins

The full src-to-dst astype grid is broadly ahead. Remaining lag clusters around same-type diagonal copy and bool conversion cases.

Fusion

4.12x

The best fixed expression speedup for fused np.evaluate over NumSharp's unfused chain; broadcast fusion reaches 4.10x.

Function Explorer

Scores use credible rows only; negligible and no-data cells remain available in the raw tables

Loading np.* function performance surface...

Optimization Priorities Recommended

Current optimization priorities from the latest snapshot

  1. Shift kernels: vectorize 100K int left/right shift.
  2. Bool bitwise: lift invert, &, |, ^.
  3. Decimal reduce: fix broadcast/sliced sum axis cliffs.
  4. i32 broadcast: repair stride-0 axis sum.
  5. f64 sum: close the 100K reduction gap.
  6. Float predicates: accelerate 100K isnan/isinf/isfinite.
  7. f32 add/mul: improve 100K scalar/literal paths.
  8. f64 add/mul: improve 100K scalar/literal paths.
  9. Float abs/neg: remove 100K C/strided cliffs.
  10. Rounding: tighten 100K f32/f64 floor/ceil/trunc.
  11. Exp/log: reduce f32/f64 mid-tier overhead.
  12. f16 unary: lift sign/math scalar fallback.
  13. Int mean: improve 10M int64/uint64 mean.
  14. Linear algebra: revisit large f64 matmul/dot.
  15. Flatten: fix the 100K copy/cast trough.
  16. Astype small: reduce scalar/1K setup cost.
  17. Ravel T: close transpose ravel mid-size gap.
  18. less->bool: specialize bool output loops.
  19. Index math: speed scalar/1K unravel/ravel-multi.
  20. NDIter copy: raise 100K copy/cast geomean.
  21. Chunk width: optimize tiny inner width dispatch.
  22. f16 operands: improve strided/reversed/broadcast cases.
  23. Cast diagonal: speed same-type copy cells.
  24. Cast bool: clean remaining * -> bool losses.
  25. Fusion: broaden fused-expression coverage.

Full Reports

Detailed tables remain available for traceability