Python-based compiler achieves orders-of-magnitude speedups

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
  • cinder

    Cinder is Meta's internal performance-oriented production version of CPython. (by facebookincubator)

  • Have a look at Cinder - https://github.com/facebookincubator/cinder - it's Meta's performance oriented fork of CPython that they use to run Instagram (which is a big Django app).

  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

  • Well, perhaps not 100x in rps, but 10x sure:

    Overall top performing frameworks (JS, Java, and Rust) at 650K rps. That's 7x.

    Top Python based framework: 86K rps.

    A very popular Python framework (flask): 2K rps. That's 325 times worse to the best.

    And that's the "single DB query" benchmark: https://www.techempower.com/benchmarks/#section=data-r21&tes...

    https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Proj...

  • 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.

    WorkOS logo
  • 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.

  • So the differences:

    https://docs.exaloop.io/codon/general/differences

    So more limited types (integers) and more type checking and collections have to have one kind of thing in them.

    There are other python compilers though, like https://github.com/Nuitka/Nuitka

    I wonder really what the advantages/disadvantages of these are?

  • Cython

    The most widely used Python to C compiler

  • codon

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

  • nit: 'Python-based' would imply to me that it's written in Python, but it looks like it's mostly C++ & LLVM:

    https://github.com/exaloop/codon/tree/develop/codon

  • aggie

    static typed programming language using python-like syntax

  • I did a similar demo project five years ago when I was learning compiler theory. And it was implemented by Python.

    https://github.com/hgoldfish/aggie

  • mypy

    Optional static typing for Python

  • 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.

    InfluxDB logo
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