Comparison among PyPy, Cython and Numba

CPython is the standard Python implementation while there are alternative implementations, extensions and packages available to boost up the speed. However, some sacrifices are required to get the full throttle speed.

Here's the extract about the comparison of three popular approaches to make Python code running faster:


Name of technology Python Package/Full implementation Type of compiler Dependency Package supported Python features supported Coding style Performance
PyPy Full implementation in RPython Just-in-time Only pure Python package (Especially NOT SciPy, Matplotlib, and scikit-learn) Full Pure Python syntax High, 10x times faster than CPython
Cython Python package Ahead-of-time Partial Cython syntax Very high, 100x times faster than CPython
Numba Python package Just-in-time LLVM Partial Only decorator syntax required ahead of desired function Very high, 100x times faster than CPython

Benchmarks are collected from here.

No comments:

Post a Comment

apt install through corporate proxy

Assuming proxy service like CNTLM is up and running on Ubuntu machine, one can use apt-get to install package with specifying http proxy inf...