Pyston Autoload

2.3.5 · active · verified Wed Apr 15

Pyston-Autoload automatically detects and enables the Pyston JIT compiler when imported, aiming to provide performance improvements for Python applications. It acts as a bootstrap mechanism for the Pyston runtime. The current version is 2.3.5, and it generally follows the release cadence of the underlying Pyston project.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates the core usage of `pyston-autoload`: a simple import at the beginning of your script. This import will automatically enable the Pyston JIT if a compatible Pyston runtime is found in the environment. If Pyston is not detected, the import will succeed, but the JIT will not be active.

import pyston_autoload
import sys

print(f"Pyston Autoload imported. This enables the Pyston JIT if the Pyston runtime is detected.")
print(f"Current Python version: {sys.version}")

# Run some typical Python code. If Pyston is active, it may run faster.
def fib(n):
    if n <= 1:
        return n
    else:
        return fib(n-1) + fib(n-2)

print(f"Calculating fib(10): {fib(10)}")

view raw JSON →