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

[ty] Cache narrowed binding types across local place loads

#25304
Comparing
charlie/narrowed-binding-cache
(
d720f60
) with
charlie/bench
(
04e50cd
)
CodSpeed Performance Gauge
×2.3
Improvement
1
Untouched
58
Skipped
60

Benchmarks

119 total
ty_micro[repeated_match_narrowed_loads]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_repeated_match_narrowed_loads
CodSpeed Performance Gauge
×2.3
352.4 ms154.9 ms
multithreaded
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+2%
1.1 s1.1 s
ty_micro[typevar_mapping_accumulation]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typevar_mapping_large_accumulation
CodSpeed Performance Gauge
+2%
321.1 ms316.1 ms
attrs
crates/ruff_benchmark/benches/ty.rs::project::attrs::project
CodSpeed Performance Gauge
+1%
509.1 ms505.7 ms
pydantic
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
7.8 s7.8 s
sympy
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
73.3 s72.9 s
ty_micro[typeis_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typeis_narrowing
CodSpeed Performance Gauge
+1%
193.9 ms192.9 ms
ty_micro[many_enum_members]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members
CodSpeed Performance Gauge
0%
96.2 ms95.8 ms
anyio
crates/ruff_benchmark/benches/ty.rs::project::anyio::project
CodSpeed Performance Gauge
0%
1.2 s1.2 s
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
0%
1.1 s1.1 s
ty_micro[pandas_tdd]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_pandas_tdd
CodSpeed Performance Gauge
0%
240.7 ms239.8 ms
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
0%
151.1 ms150.6 ms
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
0%
81.8 ms81.6 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_tuple_assignments
CodSpeed Performance Gauge
0%
63 ms62.8 ms
ty_micro[large_isinstance_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_isinstance_narrowing
CodSpeed Performance Gauge
0%
149.5 ms149.1 ms
ty_micro[gradual_vararg_call]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_gradual_vararg_call
CodSpeed Performance Gauge
0%
71.4 ms71.3 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
0%
71.3 ms71.1 ms
ty_micro[many_protocol_members_mismatch]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_protocol_members_mismatch
CodSpeed Performance Gauge
0%
370.5 ms369.8 ms
ty_check_file[incremental]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
0%
8 ms8 ms
colour_science
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
42.5 s42.4 s
ty_micro[many_enum_members_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members_2
CodSpeed Performance Gauge
0%
92.3 ms92.2 ms
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
0%
70.8 ms70.7 ms
altair
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
4.7 s4.7 s
ty_micro[large_union_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_union_narrowing
CodSpeed Performance Gauge
0%
528.6 ms528.5 ms
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
0%
77.5 ms77.5 ms

Commits

Click on a commit to change the comparison range
Base
charlie/bench
04e50cd
×2.3
Cache narrowed binding types across local place loads
d720f60
4 hours ago
by charliermarsh
© 2026 CodSpeed Technology
Home Terms Privacy Docs