Avatar for the astral-sh user
astral-sh
ruff
BlogDocsChangelog

[ty] support implicit recursive union type aliases

#22238
Comparing
mtshiba:implicit-recursive-union
(
8127108
) with
main
(
ea4b406
)
CodSpeed Performance Gauge
-10%
Improvement
7
Regression
1
Untouched
109
New
2

Benchmarks

119 total
ty_micro[large_union_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_union_narrowing
CodSpeed Performance Gauge
-10%
531 ms587.3 ms
multithreaded
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+20%
1.3 s1 s
colour_science
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+19%
42.8 s36.1 s
ty_micro[typevar_mapping_accumulation]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typevar_mapping_large_accumulation
CodSpeed Performance Gauge
+17%
370.3 ms316.9 ms
pydantic
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+13%
7.8 s6.9 s
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
+13%
1.2 s1 s
altair
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+9%
5.1 s4.6 s
pandas
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+5%
62.2 s59.5 s
ty_micro[recursive_union_type_alias_and_protocol]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_recursive_union_type_alias_and_protocol
CodSpeed Performance Gauge
N/A
N/A74.3 ms
ty_micro[recursive_union_type_alias_and_protocol]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_recursive_union_type_alias_and_protocol
CodSpeed Performance Gauge
N/A
N/A16.4 MB
ty_micro[large_union_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_union_narrowing
CodSpeed Performance Gauge
-3%
21.9 MB22.7 MB
static_frame
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+3%
21.3 s20.7 s
freqtrade
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+2%
7.9 s7.8 s
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
+2%
73.2 MB72 MB
tanjun
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
3 s2.9 s
ty_micro[typevar_mapping_small_accumulations]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typevar_mapping_small_accumulations
CodSpeed Performance Gauge
+1%
179.6 ms177.7 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
-1%
15.8 MB16 MB
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
-1%
15.8 MB16 MB
sympy
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
63.4 s62.8 s
ty_micro[large_isinstance_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_isinstance_narrowing
CodSpeed Performance Gauge
-1%
16.9 MB17 MB
ty_micro[pandas_tdd]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_pandas_tdd
CodSpeed Performance Gauge
+1%
254.5 ms252.2 ms
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
-1%
22.7 MB22.9 MB
ty_check_file[incremental]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
-1%
7.8 ms7.9 ms
DateType
crates/ruff_benchmark/benches/ty.rs::project::datetype::project
CodSpeed Performance Gauge
-1%
26.2 MB26.3 MB
ty_micro[pandas_tdd]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_pandas_tdd
CodSpeed Performance Gauge
0%
46.7 MB47 MB

Commits

Click on a commit to change the comparison range
Base
main
ea4b406
+9.29%
reduce `UnionTypeInstance` size
05f820b
8 months ago
by mtshiba
-18.71%
update snapshots
536ecc5
8 months ago
by mtshiba
-0.15%
Merge branch 'main' into implicit-recursive-union
8d46acf
8 months ago
by mtshiba
-0.97%
intern `EagerUnionTypeInstance`
68cea9a
8 months ago
by mtshiba
-1.41%
Revert "intern `EagerUnionTypeInstance`"
89b4975
8 months ago
by mtshiba
-0.38%
wip
76556bc
8 months ago
by mtshiba
+0.31%
Reapply "reduce `UnionTypeInstance` size"
7a1d2d3
8 months ago
by mtshiba
+21.31%
remove unnecessary code
2c6879b
8 months ago
by mtshiba
-20.42%
use `infer_same_file_expression_type` in `{lazy_union_, ImplicitTypeAliasType::}value_type`
4853b11
8 months ago
by mtshiba
-0.84%
Revert "use `infer_same_file_expression_type` in `{lazy_union_, ImplicitTypeAliasType::}value_type`"
72927f8
8 months ago
by mtshiba
+26.71%
Update callable.md
2893943
8 months ago
by mtshiba
-0.01%
Merge branch 'main' into implicit-recursive-union
c095ce3
8 months ago
by mtshiba
-29.67%
Update ty_walltime.rs
36f981f
8 months ago
by mtshiba
+29.92%
Merge branch 'main' into implicit-recursive-union
c2ae1b3
8 months ago
by mtshiba
+0.34%
Merge branch 'main' into implicit-recursive-union
c292e50
7 months ago
by mtshiba
-23.41%
avoid stack overflow
c827c3e
7 months ago
by mtshiba
+0.78%
add a regression benchmark test
938a7ce
7 months ago
by mtshiba
+7.29%
experiment: check the impact of the PR on the non-determinism of mypy_primer diffs
1b16d89
7 months ago
by mtshiba
0%
Merge branch 'main' into implicit-recursive-union
276a8ce
7 months ago
by mtshiba
+17.78%
experiment: check the impact of the PR on the non-determinism of mypy_primer diffs (2)
41c6480
7 months ago
by mtshiba
-25.19%
Revert "experiment: check the impact of the PR on the non-determinism of mypy_primer diffs"
882c15a
7 months ago
by mtshiba
+22.07%
Merge branch 'main' into implicit-recursive-union
6e1712e
7 months ago
by mtshiba
-72.3%
Update ty_walltime.rs
ce8fadf
7 months ago
by mtshiba
+52.18%
improve `TypedDict` narrowing logic
a100e6c
7 months ago
by mtshiba
-1.41%
Merge branch 'main' into implicit-recursive-union
a5a5076
7 months ago
by mtshiba
-7.2%
Merge branch 'main' into implicit-recursive-union
930fa1d
7 months ago
by mtshiba
+2.78%
refactor
50943c6
7 months ago
by mtshiba
+0.78%
Merge remote-tracking branch 'upstream/main' into implicit-recursive-union
3457f20
5 months ago
by mtshiba
+0.27%
Cache implicit alias value inference
f9844ff
5 months ago
by mtshiba
+1.37%
address review comments
bbe74f1
4 months ago
by mtshiba
+8.88%
Merge branch 'fix-cycle-detector' into implicit-recursive-union
8bbdc1d
4 months ago
by mtshiba
-9.55%
Merge branch 'main' into implicit-recursive-union
a41cfe9
4 months ago
by mtshiba
-1.79%
promote to lazy only when the alias is recursive
e0b173f
4 months ago
by mtshiba
+1.79%
Revert "promote to lazy only when the alias is recursive"
5f7049b
4 months ago
by mtshiba
-0.04%
add identity preservation for `UnionType::map_leave_aliases`
8127108
4 months ago
by mtshiba
© 2026 CodSpeed Technology
Home Terms Privacy Docs