Ruff: An Extremely Fast Python Linter and Code Formatter, Written in Rust
summary
Ruff is a Rust linter and formatter that claims 10x–1000x faster than alternatives and records millions of downloads per month, and the talk gives concrete reasons why: single-tokenize/parse/semantic model to avoid duplicated work, a handwritten parser that doubles parser speed and yields a 2x parser / 20–40% whole-tool speedup, byte‑offset indexing that cuts runtime by about 10%, small integer stack optimization saving 2–8% in lexing, and replacing a suppression regex with a hand lexer for 3–10× comment parsing.
AI-written summary · about
chapters (7)
- 0:00Ruff introduction
- 10:41Speed principles
- 22:48Optimization examples
- 37:44Parser rewrite gains
- 43:02Rust's role
- 57:13Funding and future
- 1:00:03Benchmarking strategy
related talks
36mPumping up Python modules using Rust
23mRewrite everything in Rust? What we learned from introducing Rust in Strawberry-GraphQL
31mPumping up Python modules using Rust
01h 01mRust for Python Developers (english)
31mBuilding an extremely fast Python package manager, in Rust
36mPolishing Python: Preventing Performance Corrosion with Rust
40mNine Rules for Writing Python Extensions in Rust
31mCan Rust make Python shine?
