All benchmarks measure computation time from JS and Python, respectively. To learn more, check out benchmark methodology.
Benchmark Summary
- Average speedup: 2.41x vs NumPy
- Best case: 972.74x
- Worst case: 0.04x
- Total benchmarks: 3513
- Machine: Apple M4 Max (16 cores, 128 GB, arm64)
- numpy-ts version: 1.7.0
Performance by Category
| Category | Avg Speedup | Count | Faster | Slower |
|---|---|---|---|---|
| creation | 3.14x | 253 | 234 | 19 |
| arithmetic | 2.79x | 421 | 367 | 54 |
| math | 1.91x | 292 | 241 | 51 |
| trig | 2.09x | 216 | 191 | 25 |
| gradient | 8.14x | 22 | 22 | 0 |
| linalg | 3.84x | 292 | 266 | 26 |
| reductions | 1.97x | 521 | 422 | 99 |
| manipulation | 2.78x | 488 | 438 | 50 |
| io | 3.06x | 66 | 52 | 14 |
| indexing | 1.69x | 226 | 146 | 80 |
| bitwise | 4.25x | 66 | 66 | 0 |
| sorting | 1.24x | 88 | 48 | 40 |
| logic | 2.98x | 274 | 242 | 32 |
| statistics | 4.31x | 28 | 25 | 3 |
| sets | 1.07x | 121 | 47 | 74 |
| random | 1.60x | 46 | 42 | 4 |
| polynomials | 4.81x | 27 | 21 | 6 |
| fft | 1.27x | 66 | 33 | 33 |
Performance by DType
| DType | Avg Speedup | Median Speedup | Count |
|---|---|---|---|
| float64 | 2.28x | 1.92x | 373 |
| float32 | 2.69x | 2.39x | 344 |
| float16 | 2.39x | 2.33x | 313 |
| int64 | 1.81x | 1.56x | 298 |
| uint64 | 1.77x | 1.50x | 290 |
| int32 | 2.35x | 2.19x | 296 |
| uint32 | 2.36x | 2.19x | 290 |
| int16 | 2.79x | 3.01x | 285 |
| uint16 | 2.66x | 2.87x | 284 |
| int8 | 3.15x | 3.12x | 285 |
| uint8 | 3.03x | 3.11x | 286 |
| complex128 | 2.08x | 1.63x | 83 |
| complex64 | 1.90x | 1.59x | 83 |
| bool | 1.56x | 1.23x | 3 |