All benchmarks measure computation time from JS and Python, respectively. To learn more, check out benchmark methodology.
Benchmark Summary
- Average speedup: 2.23x vs NumPy
- Best case: 69.51x
- Worst case: 0.13x
- Total benchmarks: 2390
- Machine: Apple M4 Max (16 cores, 128 GB, arm64)
- numpy-ts version: 1.3.0
Performance by Category
| Category | Avg Speedup | Count | Faster | Slower |
|---|---|---|---|---|
| creation | 2.52x | 213 | 189 | 24 |
| arithmetic | 2.86x | 295 | 276 | 19 |
| math | 0.93x | 125 | 55 | 70 |
| trig | 1.04x | 216 | 109 | 107 |
| gradient | 7.40x | 22 | 22 | 0 |
| linalg | 3.43x | 269 | 259 | 10 |
| reductions | 1.90x | 413 | 326 | 87 |
| manipulation | 3.46x | 231 | 211 | 20 |
| io | 3.19x | 66 | 54 | 12 |
| indexing | 1.27x | 115 | 67 | 48 |
| bitwise | 1.98x | 10 | 10 | 0 |
| sorting | 1.11x | 75 | 33 | 42 |
| logic | 4.59x | 142 | 132 | 10 |
| statistics | 3.68x | 26 | 23 | 3 |
| sets | 2.44x | 33 | 24 | 9 |
| random | 1.33x | 46 | 39 | 7 |
| polynomials | 5.78x | 27 | 27 | 0 |
| fft | 1.37x | 66 | 30 | 36 |
Performance by DType
| DType | Avg Speedup | Median Speedup | Count |
|---|---|---|---|
| float64 | 1.92x | 1.84x | 288 |
| float32 | 2.37x | 2.53x | 238 |
| float16 | 2.36x | 2.44x | 211 |
| int64 | 1.75x | 1.64x | 196 |
| uint64 | 1.62x | 1.53x | 188 |
| int32 | 2.21x | 2.33x | 204 |
| uint32 | 2.26x | 2.39x | 189 |
| int16 | 2.52x | 3.06x | 185 |
| uint16 | 2.49x | 2.97x | 184 |
| int8 | 3.00x | 2.98x | 185 |
| uint8 | 2.95x | 2.83x | 186 |
| complex128 | 1.87x | 1.68x | 68 |
| complex64 | 1.75x | 1.67x | 68 |