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

Benchmark Summary

  • Average speedup: 1.22x vs NumPy
  • Best case: 38.46x
  • Worst case: 0.11x
  • Total benchmarks: 2390
  • Machine: Apple M4 Max (16 cores, 128 GB, arm64)
  • numpy-ts version: 1.3.0

Performance by Category

CategoryAvg SpeedupCountFasterSlower
creation1.31x21315063
arithmetic1.28x295160135
math0.61x1252996
trig0.55x21646170
gradient3.54x22220
linalg1.91x26919772
reductions1.04x413237176
manipulation1.87x23119239
io2.19x665313
indexing0.71x1153679
bitwise0.83x1037
sorting0.87x752550
logic2.33x14210735
statistics1.55x261511
sets2.25x332013
random0.89x461630
polynomials3.19x27270
fft0.84x662640

Performance by DType

DTypeAvg SpeedupMedian SpeedupCount
float641.03x1.00x288
float321.13x1.07x238
float161.54x1.47x211
int641.08x1.10x196
uint641.01x1.04x188
int321.25x1.24x204
uint321.30x1.28x189
int161.32x1.48x185
uint161.31x1.45x184
int81.55x1.58x185
uint81.55x1.61x186
complex1280.85x0.86x68
complex640.76x0.68x68