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

[ty] support implicit recursive union type aliases

#22238
Comparing
mtshiba:implicit-recursive-union
(
f9844ff
) with
main
(
f510d54
)
CodSpeed Performance Gauge
-10%
Regression
1
Untouched
43
New
1
Skipped
12

Benchmarks

57 total
ty_micro[large_union_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_union_narrowing
CodSpeed Performance Gauge
-10%
491.9 ms548 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/A73.5 ms
lexer[numpy/globals.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
30.3 µs30.3 µs
ty_micro[very_large_tuple]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_very_large_tuple
CodSpeed Performance Gauge
0%
72.8 ms72.8 ms
lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
79.2 µs79.2 µs
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
0%
76.8 ms76.8 ms
lexer[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
228.6 µs228.6 µs
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
511.5 µs511.4 µs
linter/default-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
212.5 µs212.5 µs
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
109.6 µs109.6 µs
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
955.3 µs955.2 µs
lexer[large/dataset.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
CodSpeed Performance Gauge
0%
1.2 ms1.2 ms
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
751.6 µs751.6 µs
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
4.5 ms4.5 ms
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
4.3 ms4.3 ms
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
9.4 ms9.4 ms
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
0%
2.2 ms2.2 ms
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
0%
2 ms2 ms
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
3.6 ms3.6 ms
formatter[numpy/globals.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
248.5 µs248.5 µs
formatter[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
1.9 ms1.9 ms
linter/all-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
0%
2 ms2 ms
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
848.5 µs848.5 µs
formatter[unicode/pypinyin.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
CodSpeed Performance Gauge
0%
689.4 µs689.4 µs
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
0%
10.4 ms10.4 ms

Commits

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