Run Summary
Type Checker Comparison
Typical time to check a package
Typical peak memory
Geometric mean of peak resident memory, over the same packages as above.
Didn't finish
Runs that hit the 5-minute timeout or the 4 GB memory limit, or crashed. Those packages are left out of every summary above for all checkers, so each checker is summarized over the same packages.
| Type Checker | Package | Reason |
|---|
Every Package
Time per checker *. marks the fastest, along with any checker within a fixed tolerance of it (10 ms or 5%). The small number is how many times slower than the fastest. ⓘ marks a note on how checkers differ on that package.
| Loading results... |
Methodology
What We Measure
We benchmark the full type checking process for each type checker running against real-world Python packages. This measures wall-clock execution time and peak RSS (resident set size) memory.
Test Process
- Shallow-clone each package from GitHub
- Install package dependencies per
install_envs.jsoninto a fresh virtual environment used only for that package, and point every type checker at it - Run each type checker with 1 warmup run (discarded) + 1 measured run, with a 5-minute timeout per run
- Record wall-clock time (to the millisecond) and peak memory usage of the measured run
Timeout: Each type checker has a 5-minute timeout. Timeouts and OOM kills are recorded as failures.
Memory: On Linux, peak RSS is reported by GNU
/usr/bin/time using %M. On macOS, it comes
from /usr/bin/time -l. Separately, on Linux the runner
polls /proc/{pid}/status (VmRSS) to enforce the memory
limit; that polling is not the reported peak.
Dependencies & Check Paths
Each package's environment is configured in
install_envs.json:
- install: Whether to
pip install -e .the package itself - deps: Additional pip packages to install
- install_env: Environment variables for installation
- check_paths: Subdirectories to type check
(e.g.
["src"]). When omitted, the entire package root is checked.
Only packages with install: true or a non-empty
deps list are benchmarked.
Configuration Overrides
Packages often ship their own type checker configs that can skew
benchmark comparisons. We do our best to run each checker in its
default setting with as neutral a configuration as possible. To
do this, we generate a minimal config file for each checker that
embeds the check_paths in its native format and pass
it via CLI flags to override any package-level config:
- Pyright:
pyrightconfig.jsonwith"include": [paths]written in-place - Mypy:
[mypy]withfiles = pathsandcheck_untyped_defs = Truevia--config-file - ty:
[src] include = [paths]inty.benchmark.tomlvia--config-file - Pyrefly:
project_includes = [paths]inpyrefly.benchmark.tomlvia--config - Zuban:
[mypy]withfiles = pathsandcheck_untyped_defs = Truevia--config-file
This means every checker sees exactly the same target paths and a neutral configuration, regardless of what the package ships.
Mypy note: By default, mypy skips the bodies of
functions that lack type annotations. The other four checkers all
analyze unannotated code. We enable check_untyped_defs = True
so that mypy checks the same amount of code as the other tools.
Metrics Explained
- Time (s): Full-process wall-clock execution time, including startup and any interpreter queries, to the millisecond. No interpreter-query cost is subtracted.
- Memory (MB): Peak resident set size in megabytes
- Didn't finish: Timed out, hit the memory limit, or crashed
Interpreter queries: locally verified November 19, 2026
Why query Python? A checker needs to locate installed packages and select types for the target Python version and platform. Asking the selected interpreter gives it environment details directly, including Python's import search paths. Which details are queried varies by checker.
The tradeoff: Launching Python adds latency, included in these timings.
Reading environment files, such as a virtual environment's pyvenv.cfg,
can avoid that launch cost, but relies on recognizing the environment layout.
Unusual installations or search paths may need explicit configuration.
Both approaches can discover a standard virtual environment successfully;
query counts alone do not establish correctness.
With Python 3.12 on macOS, a fresh package virtual environment, and this runner's generated configs and interpreter flags, we observed:
- Pyrefly 1.5.0: One query for version, platform, and import paths. Pyrefly configuration.
- Pyright 1.1.414: Two queries with
--pythonpath, for version and import paths. Pyright environment discovery. - mypy 2.4.1: One query with
--python-executablepointing to the separate package environment. Using mypy's own interpreter can avoid this extra process. mypy import discovery. - ty 0.0.107: No interpreter launch observed with
--pythonpointing to the virtual-environment directory. ty environment discovery. - Zuban 0.10.2: No interpreter launch observed with
--python-executablepointing into that virtual environment. Zuban configuration.
Query counts depend on versions and configuration. This local audit does not establish counts for every historical result or platform, and its injected delay is not an estimate of normal query overhead. A discarded warmup does not remove queries in subsequent fresh processes. Reproduce the audit.
Summary Statistics
Package sizes span three orders of magnitude. An ordinary average is dominated by the few largest packages, where one slow result can outweigh dozens of typical ones. The headline figure is therefore the geometric mean of the time per package, which weighs every package equally in relative terms and is the usual way benchmark suites are summarized. The median, average and total are available as alternatives; the average and total suit readers who mostly care about very large codebases.
Every summary uses only the packages that all checkers finished, so each checker is summarized over the same packages.