How PyOverdrive speeds up existing NumPy code without rewriting it
A guide to PyOverdrive, a package for speeding up NumPy code, with the steps to run it, its limits, and what you need before you install it.
SayDeploy is published by the makers of PyOverdrive; this page explains how PyOverdrive works from the maker's own description.
PyOverdrive is a Python package that speeds up existing NumPy code without a rewrite. [1] It checks its fast paths against stock NumPy on your own machine. [1] The version is 1.0.0 and its status is Beta. [1]
| Option | What it does |
|---|---|
| Enable | Supported NumPy operations in existing code use faster methods [1] |
| Fallback | Sends calls outside the measured range, or a fast path that errors, to stock NumPy [1] |
| Self-check | Compares every fast path with stock NumPy on your machine [1] |
| Calibrate | Re-times threaded paths on your CPU and switches off any that do not pay there [1] |
| Explain | Reports which path a call would take and why, without running it [1] |
| You can turn off one fast path | You can turn off one fast path by setting its environment setting, or restore the original NumPy functions by calling the package's disable call. [1] |
| You can run the timing demo | The demo command runs in about 20 seconds and times the headline operations with stock NumPy and with PyOverdrive on your machine. [1] |
| Faster math on large arrays | Threaded paths for np.sin, np.cos, np.tan, np.exp, np.log, np.log10 and np.tanh above a size floor of 3e5-3e6 elements [1] |
| Small-batch linear algebra | Vectorized QR for stacks of 3x3 matrices, benchmarked at 10k matrices [1] |
What it does and why
PyOverdrive is made by the team that publishes this site, SayDeploy.
Calling pyoverdrive.enable() makes supported NumPy operations in your existing code use faster methods, and calls it does not support keep using standard NumPy. [1]
A faster method runs only when a check confirms the input is within the range measured for it. [1] Other inputs, and any error raised by a faster method, cause the call to use standard NumPy. [1]
For the functions np.sin, np.cos, np.tan, np.exp, np.log, np.log10 and np.tanh, threaded paths run on C-contiguous float64/float32 arrays. [1] They run above a size floor of 3e5-3e6 elements, set separately for each function and number type. [1]
For large stacks of 3x3 matrices, np.linalg.qr uses a vectorized closed-form Householder method, which the package benchmarked at 10k matrices. [1] The np.linalg.eigvalsh function has closed-form paths for 2x2 and 3x3 matrices in float batches above a size threshold. [1]
Sufficiently large np.einsum calculations use NumPy's own optimization once they pass a measured size threshold. [1] For a flat list of text or other Python objects, np.isin can use a faster lookup instead of its default method. [1]
How it works step by step
Start by installing the package. You install it with pip straight from the GitHub repository. [1] It needs Python 3.12 or newer. [1]
Next, run the timing check. Running python -m pyoverdrive --demo times the headline operations with stock NumPy and with PyOverdrive on your machine, and it takes about 20 seconds. [1]
Then add the enable call. Calling pyoverdrive.enable() makes supported NumPy operations in your existing code use faster methods. [1] Calls it does not support keep using standard NumPy. [1]
Run the comparison check. Running python -m pyoverdrive --selfcheck compares every faster method with standard NumPy on your own machine. [1]
Re-time the threaded paths for your processor. Running python -m pyoverdrive --calibrate re-times the threaded paths at their own thresholds on your CPU and switches off any that do not pay there. [1]
Before a call runs, ask which path it would take. pyoverdrive.explain() tells you which method a call would use and why, without running the call. [1]
If one fast path causes a problem, turn it off. You can turn off one fast path by setting an environment setting that names it, or by using the package's own switch for that path. [1] Calling the package's disable call restores the original NumPy functions. [1]
Things to check before you choose
Calls outside a fast path's measured range go to stock NumPy, so they get no speedup from that path. [1] Threaded paths run only above their size floors, and the einsum path runs only past its measured threshold. [1] [1]
This page gives no speed figure that applies to every machine. The demo step times the operations on your own machine instead. [1]
np.isin can use hash-set membership, a way of checking whether each value appears in a set, instead of its default method, for one-dimensional StringDType or object arrays. [1] Check the repository for which array types this faster lookup supports before you rely on it.
The package is at version 1.0.0 and its status is Beta. [1] Read the repository's notes before you depend on it in a production project.
What you need to run it
The package is marked OS independent, a label for operating-system compatibility in general. Its test suite has been run on Windows and on Linux x86-64. [1] Check the repository for test results on other systems, such as macOS, before you rely on them.
The package needs Python 3.12 or newer. [1] You install it with pip straight from the GitHub repository. [1] It is open source under the MIT License. [1]
The facts for this page do not state a price, so check the repository for any cost before you plan a project around it.
The table below lists what the package does, one row for each stated capability.
Frequently asked questions
Can PyOverdrive speed up existing NumPy code without rewriting it?
Calling pyoverdrive.enable() patches supported NumPy functions so your existing code uses faster paths. [1] Calls it does not support run on stock NumPy, so code that is not covered keeps working as before. [1] You can confirm which calls are covered by running the self-check and explain steps on your own code. [1]
What happens when PyOverdrive cannot handle an input?
A faster method runs only when a check confirms the input is within the range measured for it. [1] Other inputs, and any error raised by a faster method, cause the call to use standard NumPy. [1] If you want to know the path a call would take before running it, pyoverdrive.explain() reports the path and the reason without running the call. [1]
How can you check PyOverdrive results against stock NumPy?
Run python -m pyoverdrive --selfcheck. It compares every fast path with stock NumPy on your own machine. [1] Run python -m pyoverdrive --demo to time the headline operations with stock NumPy and with PyOverdrive, which takes about 20 seconds. [1] Both commands run on your own machine, so the results reflect your own hardware. [1]
Can PyOverdrive turn off a single fast path?
You can turn off one fast path with disable_path() or the PYOVERDRIVE_DISABLE setting. [1] Calling pyoverdrive.disable() restores the original NumPy functions. [1] The package is open source under the MIT License, so its terms are stated in the license file. [1] Check the repository for the license text before you use it in a commercial project.
Which Python version does PyOverdrive need?
PyOverdrive needs Python 3.12 or newer. [1] You install it with pip straight from the GitHub repository. [1] The version is 1.0.0 and its status is Beta, so check the repository for recent changes before you depend on it in a project. [1]
It is open source under the MIT License. [1]
Try PyOverdriveSources
Related comparisons
- Best NumPy acceleration libraries for data scientists in 2026
- Bottleneck alternatives in 2026 for NumPy speed
- Bottleneck vs CuPy in 2026: Pricing, Setup and Features
- Bottleneck vs Cython in 2026: Pricing, Setup, Features
- Bottleneck vs dpnp in 2026: Pricing, Setup and Features
- Bottleneck vs Pythran in 2026: Pricing, Setup, Features
- CuPy alternatives in 2026 for NumPy acceleration
- CuPy vs Cython in 2026: Pricing, Setup and Features
- CuPy vs Dask in 2026: Pricing, Setup and How to Choose
- CuPy vs JAX in 2026: Pricing, Setup and Features