Python at the Speed of Rust: A New Compiler
2025-04-12

This article introduces Function, a Python compiler that compiles Python code to native code, significantly boosting execution speed. Using matrix multiplication as an example, it demonstrates how symbolic tracing builds an Intermediate Representation (IR) graph, which is then lowered into native code (e.g., C). This achieves performance comparable to Rust. While still a proof-of-concept, Function is already powering production applications like monocular depth estimation and real-time pose detection. Future goals include on-device LLM inference.
Development