All benchmarks measure computation time from JS and Python, respectively. To learn more, check out benchmark methodology.
Benchmark Summary
- Average speedup: 2.21x vs NumPy
- Best case: 82.61x
- Worst case: 0.20x
- Total benchmarks: 2390
- Machine: Apple M4 Max (16 cores, 128 GB, arm64)
- numpy-ts version: 1.5.0
Performance by Category
| Category | Avg Speedup | Count | Faster | Slower |
|---|---|---|---|---|
| creation | 2.35x | 213 | 184 | 29 |
| arithmetic | 2.75x | 295 | 287 | 8 |
| math | 2.19x | 125 | 105 | 20 |
| trig | 2.02x | 216 | 189 | 27 |
| gradient | 7.02x | 22 | 22 | 0 |
| linalg | 2.96x | 269 | 228 | 41 |
| reductions | 1.90x | 413 | 339 | 74 |
| manipulation | 1.93x | 231 | 164 | 67 |
| io | 2.88x | 66 | 50 | 16 |
| indexing | 1.14x | 115 | 51 | 64 |
| bitwise | 1.80x | 10 | 10 | 0 |
| sorting | 1.10x | 75 | 36 | 39 |
| logic | 3.61x | 142 | 129 | 13 |
| statistics | 3.88x | 26 | 23 | 3 |
| sets | 2.92x | 33 | 25 | 8 |
| random | 1.55x | 46 | 41 | 5 |
| polynomials | 4.01x | 27 | 21 | 6 |
| fft | 1.06x | 66 | 28 | 38 |
Performance by DType
| DType | Avg Speedup | Median Speedup | Count |
|---|---|---|---|
| float64 | 2.05x | 1.73x | 288 |
| float32 | 2.28x | 2.26x | 238 |
| float16 | 2.22x | 2.21x | 211 |
| int64 | 1.65x | 1.40x | 196 |
| uint64 | 1.62x | 1.36x | 188 |
| int32 | 2.13x | 2.14x | 204 |
| uint32 | 2.21x | 2.16x | 189 |
| int16 | 2.59x | 2.84x | 185 |
| uint16 | 2.56x | 2.84x | 184 |
| int8 | 2.90x | 3.01x | 185 |
| uint8 | 2.86x | 2.99x | 186 |
| complex128 | 1.96x | 1.68x | 68 |
| complex64 | 1.86x | 1.57x | 68 |