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

[ty] narrow tagged unions of `TypedDict`

#22104Merged
Comparing
typeddict_union_narrowing
(
05184f3
) with
main
(
4c175fa
)
CodSpeed Performance Gauge
0%
Untouched
22
Skipped
30

Benchmarks

52 total
pydantic
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
+3%
10.7 s10.4 s
multithreaded
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-2%
1.4 s1.4 s
tanjun
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-1%
2.5 s2.5 s
DateType
crates/ruff_benchmark/benches/ty.rs::project::datetype::project
CodSpeed Performance Gauge
+1%
229.2 ms227.1 ms
pandas
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-1%
61.6 s62.2 s
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
+1%
67.3 ms66.7 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
+1%
67.8 ms67.3 ms
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
+1%
70.6 ms70 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_tuple_implicit_instance_attributes
CodSpeed Performance Gauge
+1%
67.4 ms66.9 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_tuple_assignments
CodSpeed Performance Gauge
+1%
65.7 ms65.3 ms
attrs
crates/ruff_benchmark/benches/ty.rs::project::attrs::project
CodSpeed Performance Gauge
+1%
426 ms423.2 ms
anyio
crates/ruff_benchmark/benches/ty.rs::project::anyio::project
CodSpeed Performance Gauge
+1%
1.2 s1.2 s
colour_science
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-1%
89.2 s89.8 s
static_frame
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-1%
20.3 s20.4 s
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
+1%
79.8 ms79.4 ms
freqtrade
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
-1%
7.9 s8 s
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
0%
130.8 ms130.2 ms
ty_check_file[incremental]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
0%
6.4 ms6.4 ms
ty_micro[many_enum_members]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members
CodSpeed Performance Gauge
0%
122 ms121.4 ms
altair
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
5.1 s5.1 s
sympy
crates/ruff_benchmark/benches/ty_walltime.rs
CodSpeed Performance Gauge
0%
50.6 s50.8 s
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
0%
1.2 s1.2 s
formatter[large/dataset.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
9.4 ms*
formatter[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
1.9 ms*
formatter[pydantic/types.py]
crates/ruff_benchmark/benches/formatter.rs::formatter::benchmark_formatter
Skipped
3.6 ms*

Commits

Click on a commit to change the comparison range
Base
main
4c175fa
+5.83%
[ty] narrow tagged unions of `TypedDict`
b31d29b
7 months ago
by oconnor663
-6.11%
Type::is_typed_dict
7803327
7 months ago
by oconnor663
+0.05%
`not in` narrowing TODO
e326492
7 months ago
by oconnor663
+0.43%
comment formatting
05184f3
7 months ago
by oconnor663
© 2026 CodSpeed Technology
Home Terms Privacy Docs