Cython alternatives in 2026 for NumPy code
Compare Cython alternatives for NumPy code speed: runtime compilers, array expression evaluators, fast array libraries, and PyOverdrive.
SayDeploy is published by LunarWerx, which makes some of the tools compared here.
Cython compiles Python and the extended Cython language, and several tools offer other ways to accelerate NumPy work. Compare them: a just-in-time compiler, an array expression evaluator, a fast array function library, an ahead-of-time compiler, and PyOverdrive.
Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. [1] numexpr is a fast numerical array expression evaluator for Python, NumPy, Pandas, PyTables and more. [2] Bottleneck is distributed under a Simplified BSD license. [3] JAX is a research project, not an official Google product. [4] Pythran is an ahead of time compiler for a subset of the Python language, with a focus on scientific computing. [5] PyOverdrive patches supported NumPy functions so your existing code uses faster paths. [6]
| Option | What it does | License |
|---|---|---|
| Cython | Optimising static compiler for Python and the extended Cython language. [7] | Apache 2.0. [7] Latest stable release 3.2.9 (released 2026-07-24). [7] |
| Numba | Open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. [1] | Supports Python 3.9-3.12. [1] |
| numexpr | Fast numerical array expression evaluator for NumPy. [2] | MIT. [2] |
| Bottleneck | Collection of fast NumPy array functions written in C. [3] | Simplified BSD. [3] |
| JAX | Uses XLA to compile and scale NumPy programs on TPUs, GPUs, and other hardware accelerators. [4] | Apache-2.0. [4] |
| Pythran | Ahead-of-time compiler for a subset of Python focused on scientific computing. [5] | BSD-3-Clause. [5] |
| PyOverdrive | Patches supported NumPy functions so existing code uses faster paths. [6] | Open source under MIT License. [6] |
Why developers look past Cython
Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language. [7] A developer comparing tools can weigh how far their code must be rewritten, kept as plain Python, or compiled at runtime.
Cython is freely available under the open source Apache 2.0 License. [7] Cython 3.0.x supports Python 2.7 and 3.5 and later. [7] Support for the CPython Limited API and free-threading CPython is available in Cython 3.1 but considered experimental. [7]
The practical difference between options usually comes down to how each one runs the code: rewriting it in an extended language, translating a subset at runtime, evaluating whole array expressions, or patching existing NumPy functions.
PyOverdrive: patches supported NumPy functions for faster paths
PyOverdrive is made by the team that publishes this site. Calling pyoverdrive.enable() patches supported NumPy functions so your existing code uses faster paths, and calls it does not support run on stock NumPy. [6] A fast path runs only when a check confirms the input is in its measured range; anything else, or a fast path that raises an error, goes to stock NumPy. [6]
python -m pyoverdrive --selfcheck compares every fast path with stock NumPy on your own machine. [6] pyoverdrive.explain() tells you which path a call would take and why, without running the call. [6] You can turn off one fast path with disable_path() or PYOVERDRIVE_DISABLE, or call pyoverdrive.disable() to restore the original NumPy functions. [6]
It is open source under the MIT License. [6] The package is marked OS independent. [6] It needs Python 3.12 or newer. [6] You install it with pip straight from the GitHub repository. [6] The version is 1.0.0 and its status is Beta. [6]
Numba: compiles a subset of Python at runtime
Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. [1] Numba translates Python functions to optimized machine code at runtime using the LLVM compiler library. [1] Numba is designed to be used with NumPy arrays and functions. [1]
Numba works with Jupyter notebooks for interactive computing, and with distributed execution frameworks like Dask and Spark. [1] Numba supports NVIDIA CUDA for writing parallel GPU algorithms from Python. [1] Numba supports Intel and AMD x86, POWER8/9, and ARM CPUs including Apple M1. [1] Numba supports Python 3.9-3.12. [1]
numexpr: evaluates array expressions faster
numexpr is a fast numerical array expression evaluator for Python, NumPy, Pandas, PyTables and more. [2] Expressions that operate on arrays (like '3a+4b') are accelerated and use less memory than doing the same calculation in Python. [2] Its multi-threaded capabilities can make use of all your cores. [2]
numexpr can make use of Intel's VML (Vector Math Library, normally integrated in its Math Kernel Library, or MKL). [2] numexpr is available for install via pip for a wide range of platforms and Python versions. [2]
Bottleneck: fast NumPy array functions in C
Bottleneck provides binary wheels for all the most common platforms. [3] A source install requires Python >3.9 and NumPy 1.16.0+. [3] Bottleneck is distributed under a Simplified BSD license. [3]
JAX: compiles NumPy programs with XLA
JAX is a research project, not an official Google product. [4] It supports reverse-mode differentiation (backpropagation) via jax.grad as well as forward-mode differentiation. [4] JAX is licensed under Apache-2.0. [4] The CPU install command is pip install -U jax. [4]
Pythran: ahead-of-time compiler for scientific Python
Pythran is an ahead of time compiler for a subset of the Python language, with a focus on scientific computing. [5] Pythran takes advantage of multi-cores and SIMD instruction units. [5] It now only supports Python 3.7 and upward. [5] Pythran is BSD-3-Clause licensed. [5]
How to pick the right Cython alternative
Choose Numba when translating plain Python functions to machine code at runtime is the goal: Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code. [1] Numba uses the LLVM compiler library and supports Python 3.9-3.12. [1] [1] Check whether the code fits the subset Numba translates.
Choose numexpr when the work is a single array expression such as '3a+4b'. [2] numexpr is available for install via pip for a wide range of platforms and Python versions. [2]
Choose Bottleneck when a prebuilt install is wanted, since it provides binary wheels for all the most common platforms. [3]
Choose JAX when automatic differentiation (backpropagation) is needed. [4] Note that JAX is a research project, not an official Google product. [4]
Choose Pythran when an ahead-of-time compiled binary is wanted, and check that the code runs on Python 3.7 and upward, since Pythran supports those versions only. [5] [5]
Choose PyOverdrive when existing NumPy code should keep running unchanged while supported functions use faster paths: calling pyoverdrive.enable() patches supported NumPy functions, and calls it does not support run on stock NumPy. [6] Run pyoverdrive --selfcheck to compare every fast path with stock NumPy on the machine in use. [6] PyOverdrive needs Python 3.12 or newer. [6]
Frequently asked questions
Which Cython alternative keeps NumPy code unchanged?
PyOverdrive lets existing code stay as-is: calling pyoverdrive.enable() patches supported NumPy functions so your existing code uses faster paths, and calls it does not support run on stock NumPy. [6] A fast path runs only when a check confirms the input is in its measured range; anything else goes to stock NumPy. [6] Check which functions PyOverdrive supports.
Which Cython alternative translates Python at runtime?
Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code at runtime using the LLVM compiler library. [1] [1] Numba is designed to be used with NumPy arrays and functions. [1] It supports Python 3.9-3.12. [1] Check whether the project's code falls inside Numba's supported subset.
Are Cython alternatives open source?
Every option on this page is open source, each released under its own license. Cython is freely available under the Apache 2.0 License. [7] Bottleneck is Simplified BSD. [3] JAX is Apache-2.0. [4] Pythran is BSD-3-Clause. [5] PyOverdrive is open source under the MIT License. [6] Check each project's license and maintenance before choosing.
Can a Cython alternative be checked on your own machine?
PyOverdrive's python -m pyoverdrive --selfcheck compares every fast path with stock NumPy on your own machine. [6] 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. [6] Check how each tool measures speed on the hardware the project uses.
Which Cython alternative works with GPU and accelerators?
JAX is licensed under Apache-2.0 and is a research project, not an official Google product. [4] [4] Numba supports NVIDIA CUDA for writing parallel GPU algorithms from Python. [1] Check which accelerator the project targets before choosing.
It is open source under the MIT License. [6]
Try PyOverdriveSources
- Numba, numba.pydata.org, read 2026-10-07
- numexpr, github.com/pydata/numexpr, read 2026-10-07
- Bottleneck, github.com/pydata/bottleneck, read 2026-10-07
- JAX, github.com/jax-ml/jax, read 2026-10-07
- Pythran, github.com/serge-sans-paille/pythran, read 2026-10-07
- PyOverdrive's own description of itself (the product of this site's publisher)
- Cython, cython.org, read 2026-10-07
Related comparisons
- Best NumPy acceleration libraries in 2026
- Best NumPy acceleration libraries for data scientists in 2026
- Bottleneck alternatives in 2026 for NumPy speed
- CuPy alternatives in 2026 for NumPy acceleration
- CSVBox alternatives in 2026 for contact CSV files
- AnatomyOf vs Codecademy in 2026: Pricing, Setup and Features
- AnatomyOf vs DevDocs in 2026: Pricing, Setup, Features
- AnatomyOf vs Exercism in 2026: Pricing, Setup and Features
- AnatomyOf vs Learn X in Y Minutes in 2026
- Best CSV import and field mapping tools in 2026