Astral Ships ty 1.0: 24x Faster at OpenAI
By @sharedot · · 6 pages
- Programming
- Python
- Type Checking
- Astral
Astral's Rust-based Python type checker ty hit 1.0 after a 24x speedup as OpenAI's default checker across millions of lines.
ty 1.0 arrives after a year of quiet adoption
Astral, the startup behind the uv package manager and Ruff linter, released version 1.0 of ty, a Python type checker and language server written in Rust, declaring it ready for broad production adoption.
Before the milestone, ty had already become the default and most widely deployed type checker inside OpenAI, covering millions of lines of production Python.
According to Astral founder Charlie Marsh, OpenAI's internal migration delivered a median 24x speedup and cut peak memory usage by 73% compared with its prior tooling. Developers can install it via uv or the official VS Code extension.
Outrunning rival Rust checkers on every benchmark
In uncached command-line benchmarks on an Apple M3 Max, Astral reported ty finished first on 16 of 18 major open-source Python projects, posting a geometric mean speedup of 1.46x over Meta's Pyrefly and 3.56x over Zuban — both also Rust-based.
The gap widened in editor workflows: ty updated diagnostics fastest on 14 of 17 projects, 7.73x faster than Pyrefly and 3.22x faster than Zuban. Its fine-grained incremental engine keeps live editor diagnostics instantaneous even on sprawling monorepos.
A different typing foundation, better correctness
Rather than the nominal subtyping most Python checkers follow, ty uses gradual and set-theoretic typing — treating types as sets of values with native unions, intersections and negation — plus a novel generics solver and bidirectional inference.
On the official Python typing conformance suite, ty 1.0 records 14 false positives and 13 false negatives, down sharply from 224 and 405 at beta, and ahead of mypy's 190 false positives and 109 false negatives.
Per LavX News, only ty of eight checkers tested caught a misspelled TypedDict key while suggesting the correction, and it flags unsound returns that mypy's --warn-return-any misses.
Adoption surging, and what's next
A November audit of the 25,000 most-downloaded PyPI packages using a type checker put ty third at 11.6%, behind Pyright at 26.0% and mypy at 62.9% — but at 22.6% among repos created in the past year, it is closing fast, with FastAPI and tox already on board.
Astral plans type-aware linting, dead-code elimination, unused dependency analysis and type-aware test selection on top of what it calls the most sophisticated Python type engine in existence.