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

[ty] Track narrowing unions to prevent exponential blowup

#22066Closed
Comparing
zb/narrow-track
(
fd525e8
) with
main
(
1a18ada
)
CodSpeed Performance Gauge
+73%
Untouched
13
Skipped
30
Archived
9

Benchmarks

52 total
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
9.4 ms*
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
4.3 ms*
linter/default-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
409.4 µs*
linter/all-with-preview-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
834.1 µs*
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
109.3 µs*
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
10.2 ms*
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
2.2 ms*
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
329.9 µs*
linter/all-with-preview-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
2.2 ms*
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
2 ms*
linter/all-with-preview-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
5.2 ms*
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
510.2 µs*
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
5.1 ms*
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
948.5 µs*
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
8.5 ms*
linter/all-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
18.5 ms*
linter/default-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
1 ms*
linter/all-with-preview-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
22.5 ms*
medium[static-frame]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
0%
19.9 s19.9 s
medium[colour-science]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
+6%
107.1 s100.7 s
multithreaded[altair]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
-1%
1.4 s1.4 s
medium[pandas]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
0%
63.8 s63.6 s
large[sympy]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
0%
50.3 s50.2 s
small[freqtrade]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
0%
7.9 s7.9 s
small[tanjun]
crates/ruff_benchmark/benches/ty_walltime.rs
Archived
CodSpeed Performance Gauge
0%
2.5 s2.5 s

Commits

Click on a commit to change the comparison range
Base
main
1a18ada
×2
[ty] Track narrowing unions to prevent exponential blowup
2fd90af
7 months ago
by zanieb
-30.8%
propagate the narrowed element instead of skipping narrowing entirely
3cf876e
7 months ago
by zanieb
+1.12%
review
fd525e8
7 months ago
by zanieb
© 2026 CodSpeed Technology
Home Terms Privacy Docs