Skip to main content
Benchmark snapshot comparing numpy-ts against native Python NumPy (OpenBLAS-backed) across small, medium, and large array sizes. Run your own via pnpm run bench.
All benchmarks measure computation time from JS and Python, respectively. To learn more, check out benchmark methodology.

Benchmark Summary

  • Average speedup: 1.25x vs NumPy
  • Best case: 2363.88x
  • Worst case: 0.10x
  • Total benchmarks: 7159
  • Machine: Apple M4 Max (16 cores, 128 GB, arm64)
  • numpy-ts version: 1.5.0

Performance by Category

CategoryAvg SpeedupCountFasterSlower
creation1.73x639465174
arithmetic1.18x885434451
math1.46x37528095
trig1.08x648365283
gradient4.27x66660
linalg1.48x807514293
reductions1.07x1239658581
manipulation1.06x693299394
io2.55x18716225
indexing0.66x345118227
bitwise0.66x30723
sorting0.80x22556169
logic1.68x426241185
statistics1.60x785226
sets3.24x997821
random0.89x1384395
polynomials2.05x816318
fft0.89x19885113

Performance by DType

DTypeAvg SpeedupMedian SpeedupCount
float641.17x1.01x863
float321.14x1.05x713
float161.44x1.44x632
int641.14x1.05x587
uint641.14x1.06x563
int321.30x1.21x611
uint321.34x1.26x566
int161.33x1.20x554
uint161.33x1.20x551
int81.42x1.28x554
uint81.41x1.30x557
complex1280.93x0.89x204
complex640.86x0.79x204