npm run bench.
Benchmark Summary
- Average speedup: 0.50x vs NumPy
- Best case: 62.55x
- Worst case: 0.07x
- Total benchmarks: 2419
- Machine: Apple M4 Max (16 cores, 128 GB, arm64)
- numpy-ts version: 1.2.0
Performance by Category
| Category | Avg Speedup | Count | Faster | Slower |
|---|---|---|---|---|
| creation | 0.92x | 215 | 90 | 125 |
| arithmetic | 0.57x | 295 | 68 | 227 |
| math | 0.46x | 146 | 21 | 125 |
| trig | 0.43x | 216 | 32 | 184 |
| gradient | 1.97x | 22 | 16 | 6 |
| linalg | 1.12x | 275 | 177 | 98 |
| reductions | 0.65x | 416 | 133 | 283 |
| manipulation | 1.22x | 231 | 107 | 124 |
| io | 1.81x | 66 | 46 | 20 |
| indexing | 0.70x | 112 | 55 | 57 |
| bitwise | 0.39x | 10 | 0 | 10 |
| sorting | 0.83x | 75 | 30 | 45 |
| logic | 1.15x | 138 | 71 | 67 |
| statistics | 0.90x | 26 | 14 | 12 |
| sets | 2.22x | 33 | 20 | 13 |
| random | 0.84x | 46 | 15 | 31 |
| polynomials | 2.77x | 27 | 18 | 9 |
| fft | 0.81x | 66 | 24 | 42 |
| utilities | 11.81x | 4 | 4 | 0 |
Performance by DType
| DType | Avg Speedup | Median Speedup | Count |
|---|---|---|---|
| float64 | 0.73x | 0.66x | 295 |
| float32 | 0.69x | 0.63x | 241 |
| float16 | 1.07x | 0.94x | 220 |
| int64 | 0.70x | 0.67x | 198 |
| uint64 | 0.69x | 0.62x | 187 |
| int32 | 0.80x | 0.69x | 207 |
| uint32 | 0.85x | 0.78x | 188 |
| int16 | 0.86x | 0.85x | 188 |
| uint16 | 0.85x | 0.86x | 184 |
| int8 | 0.99x | 0.97x | 188 |
| uint8 | 0.98x | 0.98x | 186 |
| complex128 | 0.57x | 0.57x | 74 |
| complex64 | 0.50x | 0.52x | 63 |