For nearly a decade, Python developers had two choices for static type checking: wait for mypy (written in Python, accurate with plugins, painfully slow on large repositories) or run Pyright (written in TypeScript on Node.js, faster in VS Code via Pylance, but heavy on RAM in CI).
In December 2026, that duopoly officially ended. Astral (the team behind uv and Ruff) shipped ty 1.0, following Meta’s Pyrefly and David Halter’s Zuban into a full-blown Rust type-checker race for Python. Astral even disclosed production numbers from OpenAI showing a median 24x speedup and 73% lower peak memory across millions of lines of code.

Instead of repeating release-note claims, we installed all five tools side by side — ty 1.0.0, pyrefly 1.5.1, zuban 0.11.1, mypy 2.4.1, and pyright 1.1.414 — and benchmarked them on an identical 201-file, 17,999-line typed Python codebase.
(Seeing the same Rust wave in JavaScript tooling? Compare Biome vs. ESLint and Prettier Benchmarks, or read Stop Passing Raw Dicts Around: Python Models for structuring typed Python code.)
The 5 Contenders: Rust Challengers vs. Legacy Giants
Before looking at milliseconds, here is how the five engines actually differ under the hood:
| Tool | Maintainer | Implementation | Built-in LSP | Killer Feature |
|---|---|---|---|---|
ty 1.0 |
Astral (uv, Ruff) |
Rust | Yes | Set-theoretic & intersection types, uv/Ruff synergy, OpenAI-scale incremental engine |
Pyrefly 1.5 |
Meta | Rust | Yes | pyrefly infer for auto-annotating untyped repos, Meta-scale typing conformance |
Zuban 0.11 |
David Halter (Jedi) |
Rust | Yes | Drop-in zmypy compatibility mode + lowest memory footprint in our test |
Pyright 1.1 |
Microsoft (Pylance) |
TypeScript (Node.js) | Yes | Deep VS Code Pylance integration, strict typing defaults |
mypy 2.4 |
Python / PSF ecosystem | Python (mypyc) | External (dmypy) |
Reference implementation + mature plugin ecosystem (django-stubs, SQLAlchemy) |

Real Benchmark: 201 Files, 17,999 Lines of Typed Python
We generated a 201-file Python repository (17,999 lines) using @dataclass(frozen=True), Generic[T], Protocol, TypedDict, async def, and chained cross-module imports (app/mod_000.py through app/mod_199.py). Every tool ran three cold passes (deleting .mypy_cache, .ruff_cache, and .pyrefly_cache between runs and passing --no-incremental to mypy) measured with /usr/bin/time -l on Apple Silicon macOS. You can reproduce the exact numbers locally using the benchmark repository on GitHub.

| Tool & Version | Median Wall Time | 3 Cold Runs (s) | Peak RSS (MB) | Speedup vs. mypy |
|---|---|---|---|---|
ty 1.0.0 |
0.042 s | 0.051, 0.039, 0.042 |
74.9 MB | 24.2x faster |
pyrefly 1.5.1 |
0.075 s | 0.089, 0.075, 0.075 |
96.1 MB | 13.5x faster |
zuban 0.11.1 |
0.102 s | 0.099, 0.105, 0.102 |
64.2 MB | 10.0x faster |
mypy 2.4.1 |
1.015 s | 1.699, 0.971, 1.015 |
149.9 MB | 1.0x (baseline) |
pyright 1.1.414 |
3.148 s | 3.008, 3.148, 3.650 |
536.0 MB | 0.32x |
Three findings jump straight out of the numbers:
- 42 milliseconds changes developer habits. When a type check finishes in
0.042 s, you run it on every git pre-commit hook and every AI agent edit loop without noticing it exists. At1–3+seconds (and tens of seconds on 200k+ line monorepos), engineers disable checks locally and wait for CI. - All three Rust engines stay under 100 MB.
zuban 0.11.1took the memory crown at 64.2 MB Peak RSS, followed byty 1.0.0(74.9 MB) andpyrefly 1.5.1(96.1 MB). Meanwhilepyrightpulled 536.0 MB because of its Node.js/V8 runtime overhead. - Config defaults caught a real-world nuance. Without a
pyproject.tomlpinningpythonVersion,pyright 1.1.414flaggedT | Noneinapp/core.py(Alternative syntax for unions requires Python 3.10 or newer), whereasty,pyrefly,zuban, andmypydefaulted to modern Python 3.10+ semantics cleanly.
Speed is only half the story: running a Rust type checker in 42 ms turns static typing from a slow CI gate into an instant feedback loop for both IDE users and AI coding agents.
What Benchmarks Hide: Conformance, Plugins, and Trade-Offs
If speed were the only criterion, mypy and Pyright would be obsolete tomorrow. In real production repositories, three caveats still decide the winner:
- The Plugin Moat (
mypystill wins here): If your backend relies heavily ondjango-stubsor custommypyplugins that synthesize dynamic ORM attributes at check time, none of the Rust checkers matchmypy’s plugin ecosystem yet. - Typing Specification Conformance: Early betas of
tysat around ~53% on the official Python typing conformance suite, drawing fair criticism. Byty 1.0, Astral pushed conformance past ~97%, closing the gap withPyrefly,Zuban, andPyrightwhile adding expressive intersection and set-theoretic types. - Incremental IDE Responsiveness: In large monorepos, a cold CLI check is less important than how fast squiggly lines update after you edit one shared model. Because
ty,Pyrefly, andZubanship native multi-threaded Rust LSP servers, IDE latency drops from seconds to single-digit milliseconds.
Practical Setup: Migrating Without Breaking Your IDE
Most blog posts skip the #1 annoyance when trying a Rust type checker in VS Code or Cursor: duplicate squiggly lines if Microsoft’s Pylance (Pyright) stays enabled alongside ty or Pyrefly.
- Disable duplicate type-checking in
.vscode/settings.json:Then enable Astral’s official ty extension (or Meta’s Pyrefly extension) so only one LSP drives diagnostics and go-to-definition.{"python.analysis.typeCheckingMode": "off","python.languageServer": "None"} - Run
tyin CI alongsidemypyduring migration:This gives developers 42 ms local feedback immediately while you verify- name: Fast Rust type check (blocking)run: uvx ty check app/- name: Legacy plugin check (optional fallback)run: uvx mypy app/django-stubsor custom plugin parity on a separate CI job.
Which Python Type Checker Should You Choose?

- Pick
ty 1.0if you already useuvandRuff, want the fastest cold/incremental check (0.042 s in our test), and want one unified Astral toolchain without custommypyplugins. - Pick
Pyreflyif you are adopting types on a large legacy Python codebase and wantpyrefly inferto bootstrap annotations automatically. - Pick
Zubanif you have an existingmypyconfiguration and want a 10x faster, ultra-low-RAM (64.2 MB) drop-in migration path viazmypy. - Keep
Pyrightif your team lives inside VS Code + Pylance and relies on its exact diagnostic behavior. - Keep
mypy(or run it in CI alongsidetylocally) if your stack depends ondjango-stubsor third-partymypyplugins.
For greenfield Python services and AI-agent-driven repositories, ty 1.0 is the new default worth benchmarking first.





