#!/usr/bin/perl while (<>) { if (/^Benchmark: timing (\d+)/) { $iters = $1 } else { /(\w+): .*?(\d+\.\d+) CPU/i or warn,next; $rate{$1} = $iters/$2; } print; } my @order = sort {$rate{$a} <=> $rate{$b}} keys %rate; print join "\t","", "Rate", @order; print "\n"; foreach $type (@order) { printf "$type\t%6.2f/s",$rate{$type}; foreach $compare (@order) { unless ($compare eq $type) { $ratio = $rate{$type} / $rate{$compare}; printf "%7.0f%%", $ratio > 1 ? 100*($ratio - 1) : -100*(1 - $ratio); } else { print " --"; } } print "\n"; }