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

[ty] Add caching for pattern match narrowing

#25613
Comparing
charlie/cache-pattern-match-narrowing
(
e436717
) with
main
(
a8a0614
)
CodSpeed Performance Gauge
+15%
Improvement
5
Regression
1
Untouched
59
Skipped
60

Benchmarks

125 total
ty_micro[literal_match_fallthrough_guarded_any]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_literal_match_fallthrough_guarded_any
CodSpeed Performance Gauge
-5%
15.8 MB16.7 MB
ty_micro[large_union_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_union_narrowing
CodSpeed Performance Gauge
+64%
562.2 ms342 ms
ty_micro[literal_match_fallthrough]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_literal_match_fallthrough
CodSpeed Performance Gauge
+19%
81.3 ms68.2 ms
ty_micro[large_union_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_union_narrowing
CodSpeed Performance Gauge
+11%
19.5 MB17.5 MB
ty_micro[literal_match_fallthrough_guarded_any]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_literal_match_fallthrough_guarded_any
CodSpeed Performance Gauge
+7%
274.9 ms256.6 ms
ty_micro[many_enum_members_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members_2
CodSpeed Performance Gauge
+5%
96.3 ms91.6 ms
ty_micro[typeis_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typeis_narrowing
CodSpeed Performance Gauge
+2%
206.1 ms202.9 ms
ty_micro[typevar_mapping_small_accumulations]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typevar_mapping_small_accumulations
CodSpeed Performance Gauge
+1%
216.6 ms213.4 ms
ty_micro[large_isinstance_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_isinstance_narrowing
CodSpeed Performance Gauge
+1%
158.6 ms157.1 ms
ty_micro[typevar_mapping_accumulation]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typevar_mapping_large_accumulation
CodSpeed Performance Gauge
+1%
1.2 s1.2 s
sympy
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
92.9 s92.5 s
tanjun
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
3.7 s3.7 s
ty_micro[very_large_tuple]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_very_large_tuple
CodSpeed Performance Gauge
0%
77.4 ms77.1 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_tuple_implicit_instance_attributes
CodSpeed Performance Gauge
0%
75.6 ms75.3 ms
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
0%
86.3 ms86.1 ms
ty_micro[pydantic_core_schema_dict]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_pydantic_core_schema_dict
CodSpeed Performance Gauge
0%
128.5 ms128.2 ms
ty_micro[many_enum_members]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members
CodSpeed Performance Gauge
0%
102 ms101.8 ms
anyio
crates/ruff_benchmark/benches/ty.rs::project::anyio::project
CodSpeed Performance Gauge
0%
1.4 s1.4 s
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
0%
168.9 ms168.6 ms
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
0%
75.3 ms75.2 ms
ty_micro[vararg_parameter_type_accumulation]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_vararg_parameter_type_accumulation
CodSpeed Performance Gauge
0%
64.8 ms64.7 ms
DateType
crates/ruff_benchmark/benches/ty.rs::project::datetype::project
CodSpeed Performance Gauge
0%
248.7 ms248.3 ms
pandas
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
81.8 s81.7 s
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
0%
3.4 s3.3 s
ty_micro[many_protocol_members_mismatch]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_protocol_members_mismatch
CodSpeed Performance Gauge
0%
375.6 ms375.2 ms

Commits

Click on a commit to change the comparison range
Base
main
a8a0614
+15.08%
[ty] Add caching for pattern match narrowing
e436717
4 hours ago
by charliermarsh
© 2026 CodSpeed Technology
Home Terms Privacy Docs