Comparison of the Two New Typecheckers
May 28, 2025
At PyCon 2025’s Typing Summit, participants saw the first demonstrations of Meta’s Pyrefly and Astral’s ty, two new Python type checkers with significant speed and analysis improvements.
Edward Li helpfully took notes and provided a right-up.
Here are some takeaways:
Both tools show substantial speed gains
- Pyrefly claims up to 1.8 million lines/sec (35× faster than Pyre, 14× faster than MyPy/Pyright), while ty benchmarks show it running 2–3× faster than Pyrefly on real-world codebases.
The tools differ in their approach to type inference
- Pyrefly pushes aggressive inference, revealing concrete unions even without annotations and catching subtle errors like
None * 2. - ty follows the gradual guarantee, treating unknown types more permissively so type checking never adds errors to working code.
- Pyrefly pushes aggressive inference, revealing concrete unions even without annotations and catching subtle errors like
Warning
Both tools are still finding their in alpha release and will undergo rapid evolution and feature convergence in the months ahead.
Edward’s full notes include benchmarks and examples on his blog.
Last updated on