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

[ty] improve complex TDD-based narrowing

#23201
Comparing
mtshiba:improve-23109
(
b0add5e
) with
main
(
51d04aa
)
CodSpeed Performance Gauge
-7%
Regression
2
Untouched
22
Skipped
30

Benchmarks

30 total
formatter[numpy/globals.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
246.5 µs*
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
2.2 ms*
formatter[unicode/pypinyin.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
687.5 µs*
linter/all-with-preview-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
22.9 ms*
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
329.5 µs*
formatter[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
1.9 ms*
linter/all-with-preview-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
5.3 ms*
linter/default-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
413.3 µs*
lexer[large/dataset.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
1.2 ms*
linter/all-with-preview-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
Skipped
2.3 ms*
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
108.8 µs*
lexer[unicode/pypinyin.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
79.2 µs*
linter/default-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
211.2 µs*
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
Skipped
955.8 µs*
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
3.6 ms*
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
9.4 ms*
lexer[pydantic/types.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
510.3 µs*
lexer[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
228 µs*
lexer[numpy/globals.py]
crates/ruff_benchmark/benches/lexer.rs::lexer::benchmark_lexer
Skipped
30.2 µs*
linter/all-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
4.4 ms*
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
744.6 µs*
linter/all-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
19.3 ms*
linter/all-rules[unicode/pypinyin.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
Skipped
2 ms*
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
4.3 ms*
linter/default-rules[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
Skipped
1 ms*

Commits

Click on a commit to change the comparison range
Base
main
51d04aa
-51.09%
[ty] improve #23109 TDD-based narrowing
c6ad1e8
4 days ago
by mtshiba
+44%
cache `narrow_by_constraint_inner`
989268d
4 days ago
by mtshiba
+0.16%
further `narrow_by_constraint_inner` optimization
f92287c
4 days ago
by mtshiba
+0.71%
further `narrow_by_constraint_inner` optimization (take 2)
0e2ca45
4 days ago
by mtshiba
-1.01%
Revert "further `narrow_by_constraint_inner` optimization (take 2)"
8369501
3 days ago
by mtshiba
-0.23%
Reapply "improve constant calculations with `resolve_to_literal`"
b2e63ce
3 days ago
by mtshiba
-2.6%
Update place_state.rs
946ea42
3 days ago
by mtshiba
+0.02%
Revert "`narrow_by_constraint` optimization (take 3)"
f10df50
2 days ago
by mtshiba
-0.31%
add `PlaceVersion` to prevent the old shadowed narrowing constraint from being applied
4eb12c8
2 days ago
by mtshiba
+2.36%
`narrow_by_constraint` optimization using `PlaceVersion`
19e63c4
1 day ago
by mtshiba
-0.15%
`narrow_by_constraint` optimization using `UnionType::from_elements_without_redundancy_check`
50fc1e9
1 day ago
by mtshiba
+0.93%
optimization in `PredicatePlaceVersionInfo`
41059e9
1 day ago
by mtshiba
+0.1%
remove `ReturnsNever` special casing
cd6c0ef
1 day ago
by mtshiba
+0.89%
remove `all_negative_narrowing_constraints_for_{expression, pattern}`
8468a9e
1 day ago
by mtshiba
-0.29%
compact `PredicatePlaceVersions`
c2fe06e
1 day ago
by mtshiba
+0.8%
store place versions per definition in `UseDefMap`
3c0be32
1 day ago
by mtshiba
-0.24%
remove `latest_place_version` from `Bindings`
9142acd
1 day ago
by mtshiba
-1.39%
intern `bindings_by_use`
b0add5e
24 hours ago
by mtshiba
© 2026 CodSpeed Technology
Home Terms Privacy Docs