mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
bench: use the same prefix in both bench methods
* etc/bench.pl.in (&bench_with_timethese): Also use y$i, as in &bench_with_gbenchmark. (&generate_grammar_calc): Don't add a prefix, let the callers do it.
This commit is contained in:
@@ -372,7 +372,7 @@ sub generate_grammar_calc ($$@)
|
|||||||
{
|
{
|
||||||
my ($base, $max, @directive) = @_;
|
my ($base, $max, @directive) = @_;
|
||||||
|
|
||||||
my $prefix = "y$base";
|
my $prefix = $base;
|
||||||
push @directive, "%define api.prefix {$prefix}"
|
push @directive, "%define api.prefix {$prefix}"
|
||||||
if ($gbench);
|
if ($gbench);
|
||||||
my $directives = directives ($base, @directive);
|
my $directives = directives ($base, @directive);
|
||||||
@@ -899,13 +899,11 @@ sub bench_with_timethese ($@)
|
|||||||
|
|
||||||
# Set up the benches as expected by timethese.
|
# Set up the benches as expected by timethese.
|
||||||
my %bench;
|
my %bench;
|
||||||
# A counter of directive sets.
|
for my $i (0 .. $#directive)
|
||||||
my $count = 1;
|
|
||||||
for my $d (@directive)
|
|
||||||
{
|
{
|
||||||
$bench{$count} = $d;
|
my $base = "y$i";
|
||||||
printf " %2d. %s\n", $count, join (' ', split ("\n", $d));
|
$bench{$base} = $directive[$i];
|
||||||
$count++;
|
printf " %2d. %s\n", $i, join (' ', split ("\n", $directive[$i]));
|
||||||
};
|
};
|
||||||
|
|
||||||
# For each bench, capture the size.
|
# For each bench, capture the size.
|
||||||
|
|||||||
Reference in New Issue
Block a user