mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
Improve the display of sizes.
* etc/bench.p.in: Higher precision. Sort by decreasing size.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2008-11-04 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
Improve the display of sizes.
|
||||||
|
* etc/bench.p.in: Higher precision.
|
||||||
|
Sort by decreasing size.
|
||||||
|
|
||||||
2008-11-04 Akim Demaille <demaille@gostai.com>
|
2008-11-04 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
Don't memcpy C++ structures.
|
Don't memcpy C++ structures.
|
||||||
|
|||||||
@@ -725,16 +725,18 @@ sub bench_grammar ($%)
|
|||||||
cmpthese ($res, 'nop');
|
cmpthese ($res, 'nop');
|
||||||
|
|
||||||
# Display the sizes.
|
# Display the sizes.
|
||||||
print "Sizes:\n";
|
print "Sizes (decreasing):\n";
|
||||||
my $width = 10;
|
my $width = 10;
|
||||||
for my $bench (keys %size)
|
for my $bench (keys %size)
|
||||||
{
|
{
|
||||||
$width = length $bench
|
$width = length $bench
|
||||||
if $width < length $bench;
|
if $width < length $bench;
|
||||||
}
|
}
|
||||||
for my $bench (keys %size)
|
# Benches sorted by decreasing size.
|
||||||
|
my @benches_per_size = sort {$size{$b} <=> $size{$a}} keys %size;
|
||||||
|
for my $bench (@benches_per_size)
|
||||||
{
|
{
|
||||||
printf "%${width}s: %5dkB\n", $bench, int ($size{$bench} / 1024);
|
printf "%${width}s: %5.2fkB\n", $bench, $size{$bench} / 1024;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user