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

[parser] Use `allocate_tokens_vec` in `from_source`

#25335Closed
Comparing
yoshi-taka:use-allocate-tokens-vec
(
049e49f
) with
main
(
0df5488
)
CodSpeed Performance Gauge
-5%
Improvement
4
Regression
5
Untouched
114

Benchmarks

123 total
linter/all-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
-18%
648.7 KB793.7 KB
linter/all-with-preview-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::preview_rules::benchmark_preview_rules
CodSpeed Performance Gauge
-18%
667.1 KB812.1 KB
linter/default-rules[pydantic/types.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
-16%
348.7 KB415.1 KB
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
-11%
19.7 KB22.1 KB
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
-6%
58.7 KB62.2 KB
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+10%
706.5 µs640.6 µs
parser[numpy/ctypeslib.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+9%
200.6 KB183.3 KB
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+6%
3.6 ms3.4 ms
parser[large/dataset.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+5%
912.2 KB870.2 KB
parser[numpy/globals.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+3%
89.6 µs87 µs
linter/default-rules[large/dataset.py]
crates/ruff_benchmark/benches/linter.rs::default_rules::benchmark_default_rules
CodSpeed Performance Gauge
+2%
4.3 ms4.2 ms
ty_micro[complex_constrained_attributes_1]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_1
CodSpeed Performance Gauge
+1%
71.5 ms70.4 ms
ty_micro[complex_constrained_attributes_3]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_3
CodSpeed Performance Gauge
+1%
77.7 ms76.5 ms
ty_micro[gradual_vararg_call]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_gradual_vararg_call
CodSpeed Performance Gauge
+1%
71.6 ms70.6 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_tuple_assignments
CodSpeed Performance Gauge
+1%
63.1 ms62.2 ms
parser[unicode/pypinyin.py]
crates/ruff_benchmark/benches/parser.rs::parser::benchmark_parser
CodSpeed Performance Gauge
+1%
248.9 µs245.4 µs
ty_micro[many_string_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_string_assignments
CodSpeed Performance Gauge
+1%
81.8 ms80.8 ms
ty_micro[vararg_parameter_type_accumulation]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_vararg_parameter_type_accumulation
CodSpeed Performance Gauge
+1%
61 ms60.3 ms
ty_micro[complex_constrained_attributes_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_complex_constrained_attributes_2
CodSpeed Performance Gauge
+1%
70.7 ms69.9 ms
ty_micro[many_tuple_assignments]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_tuple_implicit_instance_attributes
CodSpeed Performance Gauge
+1%
71 ms70.2 ms
ty_check_file[incremental]
crates/ruff_benchmark/benches/ty.rs::check_file::benchmark_incremental
CodSpeed Performance Gauge
+1%
165.6 KB163.9 KB
ty_micro[very_large_tuple]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_very_large_tuple
CodSpeed Performance Gauge
+1%
72.9 ms72.2 ms
linter/all-rules[numpy/globals.py]
crates/ruff_benchmark/benches/linter.rs::all_rules::benchmark_all_rules
CodSpeed Performance Gauge
+1%
761.2 µs754.1 µs
ty_micro[literal_match_fallthrough]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_literal_match_fallthrough
CodSpeed Performance Gauge
+1%
76.9 ms76.2 ms
ty_micro[many_enum_members_2]
crates/ruff_benchmark/benches/ty.rs::micro::benchmark_many_enum_members_2
CodSpeed Performance Gauge
+1%
92.4 ms91.6 ms

Commits

Click on a commit to change the comparison range
Base
main
0df5488
-4.93%
[parser] Use `allocate_tokens_vec` in `from_source`
049e49f
2 hours ago
by yoshi-taka
© 2026 CodSpeed Technology
Home Terms Privacy Docs