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

54 total
sympy
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-7%
69.7 s75.3 s
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
-6%
1.3 s1.4 s
colour_science
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
131 s129.5 s
ty_check_file[incremental]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
0%
7.9 ms7.9 ms
multithreaded
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
1.3 s1.3 s
static_frame
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-1%
30.1 s30.5 s
ty_micro[many_enum_members_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members_2
CodSpeed Performance Gauge
-2%
157.1 ms159.7 ms
altair
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
4.9 s5 s
pydantic
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
7.4 s7.6 s
freqtrade
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
9.1 s9.3 s
anyio
crates/ruff_benchmark/benches/ty.rs::project::anyio::project
CodSpeed Performance Gauge
-2%
1.2 s1.2 s
pandas
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
79.6 s81.4 s
tanjun
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
2.7 s2.8 s
DateType
crates/ruff_benchmark/benches/ty.rs::project::datetype::project
CodSpeed Performance Gauge
-3%
210.7 ms216.4 ms
ty_micro[many_enum_members]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members
CodSpeed Performance Gauge
-3%
126.8 ms130.7 ms
attrs
crates/ruff_benchmark/benches/ty.rs::project::attrs::project
CodSpeed Performance Gauge
-3%
476 ms491.2 ms
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
-3%
77.3 ms80.1 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_tuple_assignments
CodSpeed Performance Gauge
-3%
65.6 ms67.9 ms
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
-4%
145.7 ms151 ms
ty_micro[very_large_tuple]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_very_large_tuple
CodSpeed Performance Gauge
-4%
69.2 ms71.7 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_tuple_implicit_instance_attributes
CodSpeed Performance Gauge
-4%
67.6 ms70.2 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
-4%
67.9 ms70.5 ms
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
-4%
67.6 ms70.3 ms
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
-4%
73.3 ms76.2 ms
formatter[numpy/globals.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
246.5 µs*

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