Skip to main content

CinderX

CinderX is a Python extension that improves the performance of the Python runtime.

Status

CinderX is under active development. It is used in production at Meta for use-cases like the Instagram Django service. It is experimental for external users. New releases are published to PyPI on a weekly basis.

Features

  • JIT Compiler — Just-in-time compilation of Python bytecode to native machine code.
  • Static Python — A stricter form/subset of Python, for type safety and optimization.

The codebase includes other features as well, such as a parallel garbage collector and a lighter weight implementation of Python interpreter frames. However these features are not compatible with the stock CPython runtime yet.

Requirements

  • Python 3.14
  • GCC 13+ or Clang 18+
LinuxmacOSWindows
x86-64
aarch64

Installation

pip install cinderx

Using the JIT

The recommended way to start using the JIT is to do:

import cinderx.jit

cinderx.jit.auto()

This will configure the CinderX extension to automatically compile Python functions to machine code. It will track what functions are called frequently and compile the hottest ones automatically.

See the JIT documentation for more details.

Performance

CinderX features deliver significant performance improvements over the standard CPython interpreter and is continually being improved. The following benchmarks were run comparing four configurations and were run on an x64 Linux Broadwell 2GHz machine.

BenchmarkNo JITCinderX JITStatic CinderX JITStatic + Primitives
Fannkuch4.24s4.40s0.84s0.59s
Richards3.73s2.12s0.88s0.45s
nbody2.89s2.15s2.31s0.23s

CinderX benchmark results across JIT and Static Python configurations

Configuration Details

  • No JIT — Baseline CPython interpreter with no JIT compilation enabled.
  • CinderX JIT — CinderX JIT compiler enabled with standard dynamically-typed Python code.
  • Static CinderX JIT — CinderX JIT with Static Python type annotations, enabling ahead-of-time type analysis and optimised code generation.
  • Static + Primitives — Static Python with primitive type specialisation, allowing the JIT to use unboxed machine-native integers and floats instead of Python objects.

License

CinderX is MIT licensed, see the LICENSE file.