npm run bench.
Benchmark Summary
- Average speedup: 0.41x vs NumPy
- Best case: 35.96x
- Worst case: 0.06x
- Total benchmarks: 2170
- Machine: Apple M4 Max (16 cores, 128 GB, arm64)
- numpy-ts version: 1.1.0
Performance by Category
| Category | Avg Speedup | Count | Faster | Slower |
|---|---|---|---|---|
| creation | 0.72x | 196 | 67 | 129 |
| arithmetic | 0.45x | 271 | 34 | 237 |
| math | 0.40x | 134 | 18 | 116 |
| trig | 0.40x | 198 | 26 | 172 |
| gradient | 1.78x | 20 | 14 | 6 |
| linalg | 0.95x | 256 | 134 | 122 |
| reductions | 0.62x | 381 | 108 | 273 |
| manipulation | 0.77x | 210 | 79 | 131 |
| io | 1.90x | 60 | 43 | 17 |
| indexing | 0.69x | 102 | 37 | 65 |
| bitwise | 0.32x | 10 | 0 | 10 |
| sorting | 0.61x | 68 | 20 | 48 |
| logic | 0.90x | 125 | 44 | 81 |
| statistics | 1.01x | 19 | 10 | 9 |
| sets | 0.34x | 30 | 4 | 26 |
| random | 0.22x | 18 | 0 | 18 |
| polynomials | 2.08x | 20 | 14 | 6 |
| fft | 0.19x | 48 | 4 | 44 |
| utilities | 11.28x | 4 | 4 | 0 |
Performance by DType
| DType | Avg Speedup | Median Speedup | Count |
|---|---|---|---|
| float64 | 0.56x | 0.51x | 276 |
| float32 | 0.54x | 0.50x | 240 |
| int64 | 0.57x | 0.53x | 196 |
| uint64 | 0.56x | 0.49x | 186 |
| int32 | 0.70x | 0.63x | 206 |
| uint32 | 0.70x | 0.67x | 187 |
| int16 | 0.71x | 0.68x | 187 |
| uint16 | 0.69x | 0.68x | 183 |
| int8 | 0.79x | 0.75x | 187 |
| uint8 | 0.78x | 0.77x | 185 |
| complex128 | 0.47x | 0.42x | 74 |
| complex64 | 0.42x | 0.40x | 63 |