Skip to main content
How does numpy-ts performance scale with array size compared to NumPy? This page shows the full picture.
All benchmarks measure computation time from JS and Python, respectively. To learn more, check out benchmark methodology.

Size Scaling Summary

Array SizeAvg SpeedupBest CaseWorst CaseBenchmarks
Small (100)1.29x39.15x0.15x2390
Medium (1K)1.10x41.60x0.12x2390
Large (10K)1.37x2363.88x0.04x2379

Small (100) — by Category

CategoryAvg SpeedupCount
creation1.45x213
arithmetic0.81x295
math1.34x125
trig1.02x216
gradient3.86x22
linalg1.48x269
reductions1.99x413
manipulation1.02x231
io3.23x66
indexing0.91x115
bitwise0.55x10
sorting0.67x75
logic0.97x142
statistics3.18x26
sets2.88x33
random1.03x46
polynomials2.11x27
fft1.18x66

Medium (1K) — by Category

CategoryAvg SpeedupCount
creation1.14x213
arithmetic1.05x295
math1.42x125
trig1.01x216
gradient3.39x22
linalg1.54x269
reductions0.99x413
manipulation0.94x231
io2.04x66
indexing0.56x115
bitwise0.52x10
sorting0.78x75
logic1.32x142
statistics1.37x26
sets2.32x33
random0.83x46
polynomials2.05x27
fft0.67x66

Large (10K) — by Category

CategoryAvg SpeedupCount
creation3.14x213
arithmetic1.93x295
math1.63x125
trig1.22x216
gradient5.96x22
linalg1.43x269
reductions0.63x413
manipulation1.23x231
io2.50x55
indexing0.55x115
bitwise1.01x10
sorting0.97x75
logic3.67x142
statistics0.94x26
sets5.10x33
random0.84x46
polynomials1.99x27
fft0.89x66