> ## Documentation Index
> Fetch the complete documentation index at: https://numpyts.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# numpy-ts vs. NumPy (Native)

Benchmark snapshot comparing numpy-ts against native Python NumPy (OpenBLAS-backed) across small, medium, and large array sizes. Run your own via `pnpm run bench`.

> [!TIP]
>
> All benchmarks measure computation time from JS and Python, respectively. To learn more, check out [benchmark methodology](https://numpyts.dev/v1.7.x/performance/methodology.md).

**Average**

**Best case**

**Worst case**

Average Performance vs. NumPy by Category

▶
Benchmark Details

**Generated:**

**Source:**

**numpy-ts:**

## Detailed Results

Higher is better. A speedup over `1.00x` means `numpy-ts` was faster than NumPy for that benchmark.

## Benchmark Summary

* **Average speedup**: 1.36x vs NumPy
* **Best case**: 3535.38x
* **Worst case**: 0.05x
* **Total benchmarks**: 10528
* **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 | 2.04x | 759 | 571 | 188 |
| arithmetic | 1.41x | 1263 | 702 | 561 |
| math | 1.36x | 876 | 514 | 362 |
| trig | 1.11x | 648 | 365 | 283 |
| gradient | 4.63x | 66 | 66 | 0 |
| linalg | 1.89x | 876 | 627 | 249 |
| reductions | 1.25x | 1563 | 961 | 602 |
| manipulation | 1.41x | 1464 | 934 | 530 |
| io | 2.69x | 187 | 161 | 26 |
| indexing | 0.84x | 678 | 323 | 355 |
| bitwise | 0.78x | 198 | 45 | 153 |
| sorting | 0.84x | 264 | 84 | 180 |
| logic | 1.37x | 822 | 393 | 429 |
| statistics | 1.91x | 84 | 64 | 20 |
| sets | 1.16x | 363 | 200 | 163 |
| random | 0.90x | 138 | 47 | 91 |
| polynomials | 2.35x | 81 | 63 | 18 |
| fft | 1.05x | 198 | 97 | 101 |

### Performance by DType

| DType | Avg Speedup | Median Speedup | Count |
| - | - | - | - |
| float64 | 1.35x | 1.15x | 1139 |
| float32 | 1.43x | 1.30x | 1031 |
| float16 | 1.59x | 1.48x | 938 |
| int64 | 1.23x | 1.14x | 893 |
| uint64 | 1.20x | 1.13x | 869 |
| int32 | 1.42x | 1.33x | 875 |
| uint32 | 1.39x | 1.30x | 869 |
| int16 | 1.40x | 1.23x | 854 |
| uint16 | 1.39x | 1.22x | 851 |
| int8 | 1.43x | 1.29x | 854 |
| uint8 | 1.41x | 1.26x | 857 |
| complex128 | 0.99x | 0.88x | 249 |
| complex64 | 0.93x | 0.81x | 249 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.