All benchmarks measure computation time from JS and Python, respectively. To learn more, check out benchmark methodology.
Benchmark Summary
- Average speedup: 2.22x vs NumPy
- Best case: 135.87x
- Worst case: 0.10x
- Total benchmarks: 3752
- Machine: Apple M4 Max (16 cores, 128 GB, arm64)
- numpy-ts version: 1.8.0
Performance by Category
| Category | Avg Speedup | Count | Faster | Slower |
|---|---|---|---|---|
| creation | 2.25x | 285 | 245 | 40 |
| arithmetic | 2.46x | 487 | 411 | 76 |
| math | 1.84x | 320 | 248 | 72 |
| trig | 2.04x | 218 | 190 | 28 |
| gradient | 8.11x | 22 | 22 | 0 |
| linalg | 2.77x | 373 | 295 | 78 |
| reductions | 1.92x | 572 | 464 | 108 |
| manipulation | 2.54x | 496 | 412 | 84 |
| io | 3.24x | 66 | 54 | 12 |
| indexing | 1.94x | 187 | 129 | 58 |
| bitwise | 2.64x | 66 | 66 | 0 |
| sorting | 1.21x | 88 | 48 | 40 |
| logic | 2.71x | 275 | 239 | 36 |
| statistics | 2.50x | 30 | 24 | 6 |
| sets | 1.52x | 121 | 71 | 50 |
| random | 1.56x | 46 | 41 | 5 |
| polynomials | 4.85x | 28 | 22 | 6 |
| fft | 1.05x | 72 | 32 | 40 |
Performance by DType
| DType | Avg Speedup | Median Speedup | Count |
|---|---|---|---|
| float64 | 2.24x | 1.88x | 381 |
| float32 | 2.65x | 2.38x | 338 |
| float16 | 2.40x | 2.29x | 318 |
| int64 | 1.60x | 1.53x | 313 |
| uint64 | 1.56x | 1.47x | 306 |
| int32 | 2.18x | 2.11x | 310 |
| uint32 | 2.17x | 2.13x | 306 |
| int16 | 2.56x | 2.53x | 299 |
| uint16 | 2.54x | 2.52x | 298 |
| int8 | 2.87x | 2.97x | 299 |
| uint8 | 2.83x | 2.97x | 300 |
| complex128 | 1.57x | 1.58x | 142 |
| complex64 | 1.48x | 1.42x | 142 |