Skip to content

Commit ab68285

Browse files
authored
[ty] Reduce tuple class-pattern benchmark inputs (astral-sh#29610)
1 parent dfe1450 commit ab68285

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • crates/ruff_benchmark/benches

‎crates/ruff_benchmark/benches/ty.rs‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,12 +1995,17 @@ fn benchmark_literal_or_pattern_reachability(criterion: &mut Criterion) {
19951995
/// Each case matches a pair of class patterns and captures their attributes. Preserving correlations
19961996
/// across the cases can produce many tuple alternatives with wide element unions.
19971997
/// Generic variants also require relating specializations when narrowing the captured attributes.
1998+
/// Eight and ten cases expose the steep growth while keeping instrumented runs short.
19981999
fn benchmark_tuple_class_pattern_captures(criterion: &mut Criterion) {
19992000
for (name, num_cases, generic) in [
20002001
("ty_micro[tuple_class_pattern_captures_8]", 8, false),
2001-
("ty_micro[tuple_class_pattern_captures]", 16, false),
2002+
("ty_micro[tuple_class_pattern_captures_10]", 10, false),
20022003
("ty_micro[generic_tuple_class_pattern_captures_8]", 8, true),
2003-
("ty_micro[generic_tuple_class_pattern_captures]", 16, true),
2004+
(
2005+
"ty_micro[generic_tuple_class_pattern_captures_10]",
2006+
10,
2007+
true,
2008+
),
20042009
] {
20052010
let type_parameters = if generic { "[T]" } else { "" };
20062011
let type_arguments = if generic { "[int]" } else { "" };

0 commit comments

Comments
 (0)