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.59x37.79x0.04x2390
Medium (1K)1.22x38.46x0.11x2390
Large (10K)1.37x2158.64x0.07x2379

Small (100) — by Category

CategoryAvg SpeedupCount
creation1.69x213
arithmetic1.31x295
math0.75x125
trig0.70x216
gradient4.26x22
linalg1.39x269
reductions2.51x413
manipulation2.12x231
io3.62x66
indexing1.20x115
bitwise1.58x10
sorting0.93x75
logic2.18x142
statistics3.56x26
sets2.89x33
random1.13x46
polynomials3.15x27
fft1.49x66

Medium (1K) — by Category

CategoryAvg SpeedupCount
creation1.31x213
arithmetic1.28x295
math0.61x125
trig0.55x216
gradient3.54x22
linalg1.91x269
reductions1.04x413
manipulation1.87x231
io2.19x66
indexing0.71x115
bitwise0.83x10
sorting0.87x75
logic2.33x142
statistics1.55x26
sets2.25x33
random0.89x46
polynomials3.19x27
fft0.84x66

Large (10K) — by Category

CategoryAvg SpeedupCount
creation3.70x213
arithmetic1.84x295
math0.73x125
trig0.62x216
gradient8.82x22
linalg1.73x269
reductions0.58x413
manipulation2.17x231
io2.36x55
indexing0.55x115
bitwise0.73x10
sorting1.07x75
logic4.46x142
statistics1.06x26
sets5.61x33
random0.87x46
polynomials3.11x27
fft1.24x66