Codon: Python Compiler

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • codon

    A high-performance, zero-overhead, extensible Python compiler using LLVM

    Repo for more details: https://github.com/exaloop/codon

    > What is Codon?

    > Codon is a high-performance Python compiler that compiles Python code to native machine code without any runtime overhead. Typical speedups over Python are on the order of 10-100x or more, on a single thread. Codon's performance is typically on par with (and sometimes better than) that of C/C++. Unlike Python, Codon supports native multithreading, which can lead to speedups many times higher still. Codon grew out of the Seq project.

    > What isn't Codon?

    > While Codon supports nearly all of Python's syntax, it is not a drop-in replacement, and large codebases might require modifications to be run through the Codon compiler. For example, some of Python's modules are not yet implemented within Codon, and a few of Python's dynamic features are disallowed. The Codon compiler produces detailed error messages to help identify and resolve any incompatibilities.

    > Codon can be used within larger Python codebases via the @codon.jit decorator. Plain Python functions and libraries can also be called from within Codon via Python interoperability.

  • Numba

    NumPy aware dynamic Python compiler using LLVM

    Just for reference,

    * Nuitka[0] "is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11."

    * Pypy[1] "is a replacement for CPython" with builtin optimizations such as on the fly JIT compiles.

    * Cython[2] "is an optimising static compiler for both the Python programming language and the extended Cython programming language... makes writing C extensions for Python as easy as Python itself."

    * Numba[3] "is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code."

    * Pyston[4] "is a performance-optimizing JIT for Python, and is drop-in compatible with ... CPython 3.8.12"

    [0] https://github.com/Nuitka/Nuitka

    [1] https://www.pypy.org/

    [2] https://cython.org/

    [3] https://numba.pydata.org/

    [4] https://github.com/pyston/pyston

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • Nuitka

    Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.

    Just for reference,

    * Nuitka[0] "is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11."

    * Pypy[1] "is a replacement for CPython" with builtin optimizations such as on the fly JIT compiles.

    * Cython[2] "is an optimising static compiler for both the Python programming language and the extended Cython programming language... makes writing C extensions for Python as easy as Python itself."

    * Numba[3] "is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code."

    * Pyston[4] "is a performance-optimizing JIT for Python, and is drop-in compatible with ... CPython 3.8.12"

    [0] https://github.com/Nuitka/Nuitka

    [1] https://www.pypy.org/

    [2] https://cython.org/

    [3] https://numba.pydata.org/

    [4] https://github.com/pyston/pyston

  • Cython

    The most widely used Python to C compiler

    Just for reference,

    * Nuitka[0] "is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11."

    * Pypy[1] "is a replacement for CPython" with builtin optimizations such as on the fly JIT compiles.

    * Cython[2] "is an optimising static compiler for both the Python programming language and the extended Cython programming language... makes writing C extensions for Python as easy as Python itself."

    * Numba[3] "is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code."

    * Pyston[4] "is a performance-optimizing JIT for Python, and is drop-in compatible with ... CPython 3.8.12"

    [0] https://github.com/Nuitka/Nuitka

    [1] https://www.pypy.org/

    [2] https://cython.org/

    [3] https://numba.pydata.org/

    [4] https://github.com/pyston/pyston

  • Pyston

    A faster and highly-compatible implementation of the Python programming language.

    Just for reference,

    * Nuitka[0] "is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11."

    * Pypy[1] "is a replacement for CPython" with builtin optimizations such as on the fly JIT compiles.

    * Cython[2] "is an optimising static compiler for both the Python programming language and the extended Cython programming language... makes writing C extensions for Python as easy as Python itself."

    * Numba[3] "is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code."

    * Pyston[4] "is a performance-optimizing JIT for Python, and is drop-in compatible with ... CPython 3.8.12"

    [0] https://github.com/Nuitka/Nuitka

    [1] https://www.pypy.org/

    [2] https://cython.org/

    [3] https://numba.pydata.org/

    [4] https://github.com/pyston/pyston

  • cpython

    The Python programming language (by faster-cpython)

    Not to forget CPython's own faster-cpython project which aims at JIT compiling. [0]

    Also JAX[1], PyTorch[2] come with JIT compilation specifically aimed at GPU kernels "fusing" multiple higher-level operation

    And NumPy/Scipy (also) uses Pythran[3], an AOT compiler not too unsimilar to Numba.

    [0] https://github.com/faster-cpython/cpython

  • pythran

    Ahead of Time compiler for numeric kernels

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • jax

    Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts