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

Drop excess capacity from Vecs when parsing

#25368
Comparing
micha/parser-shrink-to-fit
(
605800b
) with
micha/thin-vec-stmt
(
fecd00b
)
CodSpeed Performance Gauge
+6%
Improvement
29
Regression
2
Untouched
92

Benchmarks

123 total
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
-5%
88.7 µs93.6 µs
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
-4%
1.4 ms1.5 ms
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+24%
18 KB14.6 KB
parser[pydantic/types.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+19%
403.2 KB339.2 KB
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+18%
186.7 KB158.7 KB
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+17%
55.5 KB47.2 KB
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+9%
862.2 KB790.1 KB
ty_micro[very_large_tuple]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_very_large_tuple
CodSpeed Performance Gauge
+6%
15.4 MB14.5 MB
ty_micro[gradual_vararg_call]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_gradual_vararg_call
CodSpeed Performance Gauge
+6%
15.2 MB14.3 MB
ty_micro[vararg_parameter_type_accumulation]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_vararg_parameter_type_accumulation
CodSpeed Performance Gauge
+6%
13.4 MB12.7 MB
DateType
crates/ruff_benchmark/benches/ty.rs::project::datetype::project
CodSpeed Performance Gauge
+6%
25.8 MB24.4 MB
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
+6%
15.6 MB14.8 MB
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
+6%
15.7 MB14.8 MB
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_tuple_implicit_instance_attributes
CodSpeed Performance Gauge
+5%
15.8 MB15 MB
ty_micro[typevar_mapping_small_accumulations]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_typevar_mapping_small_accumulations
CodSpeed Performance Gauge
+5%
15.5 MB14.7 MB
ty_micro[literal_match_fallthrough]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_literal_match_fallthrough
CodSpeed Performance Gauge
+5%
13.8 MB13.1 MB
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
+5%
16.7 MB15.9 MB
ty_micro[many_enum_members_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members_2
CodSpeed Performance Gauge
+5%
16.8 MB16 MB
ty_micro[large_isinstance_narrowing]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_large_isinstance_narrowing
CodSpeed Performance Gauge
+5%
16.7 MB15.9 MB
hydra-zen
crates/ruff_benchmark/benches/ty.rs::project::hydra::project
CodSpeed Performance Gauge
+5%
71 MB67.5 MB
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
+5%
17.2 MB16.3 MB
ty_micro[many_protocol_members_mismatch]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_protocol_members_mismatch
CodSpeed Performance Gauge
+5%
21.8 MB20.7 MB
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_tuple_assignments
CodSpeed Performance Gauge
+5%
14.4 MB13.8 MB
ty_check_file[cold]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_cold
CodSpeed Performance Gauge
+5%
22.2 MB21.2 MB
ty_micro[pandas_tdd]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_pandas_tdd
CodSpeed Performance Gauge
+5%
45.6 MB43.5 MB

Commits

Click on a commit to change the comparison range
Base
micha/thin-vec-stmt
fecd00b
+6.34%
Remove excess capacity during parsing
605800b
7 hours ago
by MichaReiser
© 2026 CodSpeed Technology
Home Terms Privacy Docs