[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Improve the display of sizes.
From: |
Akim Demaille |
Subject: |
[PATCH] Improve the display of sizes. |
Date: |
Tue, 04 Nov 2008 20:43:39 -0000 |
* etc/bench.p.in: Higher precision.
Sort by decreasing size.
---
ChangeLog | 6 ++++++
etc/bench.pl.in | 8 +++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ba6b25f..8080701 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2008-11-04 Akim Demaille <address@hidden>
+ Improve the display of sizes.
+ * etc/bench.p.in: Higher precision.
+ Sort by decreasing size.
+
+2008-11-04 Akim Demaille <address@hidden>
+
Don't memcpy C++ structures.
* data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
arguments.
diff --git a/etc/bench.pl.in b/etc/bench.pl.in
index 93f3d17..d1b2aa4 100755
--- a/etc/bench.pl.in
+++ b/etc/bench.pl.in
@@ -725,16 +725,18 @@ sub bench_grammar ($%)
cmpthese ($res, 'nop');
# Display the sizes.
- print "Sizes:\n";
+ print "Sizes (decreasing):\n";
my $width = 10;
for my $bench (keys %size)
{
$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;
}
}
--
1.6.0.2.588.g3102
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Improve the display of sizes.,
Akim Demaille <=