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

[ty] Preserve literal types for loop variables over literal collections

#25083Closed
Comparing
charlie/literal-loop-narrow
(
39ef2f9
) with
main
(
38fc8c0
)
CodSpeed Performance Gauge
0%
Untouched
57
Skipped
60

Benchmarks

117 total
pydantic
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
7.8 s7.7 s
multithreaded
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
1.1 s1.1 s
altair
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
4.7 s4.6 s
pandas
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
61 s60.4 s
colour_science
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
38.8 s38.5 s
sympy
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
64.9 s64.4 s
static_frame
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
20.7 s20.6 s
ty_micro[large_union_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_union_narrowing
CodSpeed Performance Gauge
+1%
530.3 ms527.6 ms
freqtrade
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+1%
7.9 s7.8 s
ty_micro[vararg_parameter_type_accumulation]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_vararg_parameter_type_accumulation
CodSpeed Performance Gauge
0%
69 ms68.7 ms
ty_micro[large_isinstance_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_isinstance_narrowing
CodSpeed Performance Gauge
0%
151.3 ms150.7 ms
tanjun
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
3 s2.9 s
ty_micro[gradual_vararg_call]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_gradual_vararg_call
CodSpeed Performance Gauge
0%
73.4 ms73.2 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
0%
73.3 ms73.1 ms
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
0%
79.5 ms79.4 ms
ty_micro[many_enum_members]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members
CodSpeed Performance Gauge
0%
98.1 ms97.9 ms
ty_check_file[incremental]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
0%
8 ms8 ms
ty_micro[many_protocol_members_mismatch]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_protocol_members_mismatch
CodSpeed Performance Gauge
0%
368.4 ms367.9 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_tuple_implicit_instance_attributes
CodSpeed Performance Gauge
0%
72.8 ms72.7 ms
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
0%
83.6 ms83.5 ms
DateType
crates/ruff_benchmark/benches/ty.rs::project::datetype::project
CodSpeed Performance Gauge
0%
225.3 ms225.2 ms
ty_micro[very_large_tuple]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_very_large_tuple
CodSpeed Performance Gauge
0%
74.9 ms74.9 ms
ty_micro[many_enum_members_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members_2
CodSpeed Performance Gauge
0%
170.8 ms170.8 ms
anyio
crates/ruff_benchmark/benches/ty.rs::project::anyio::project
CodSpeed Performance Gauge
0%
85.1 MB85.1 MB
ty_micro[many_enum_members_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members_2
CodSpeed Performance Gauge
0%
17.9 MB17.9 MB

Commits

Click on a commit to change the comparison range
Base
main
38fc8c0
+0.12%
[ty] Preserve literal types for loop variables over literal collections
39ef2f9
2 hours ago
by charliermarsh
© 2026 CodSpeed Technology
Home Terms Privacy Docs