]> git.imager.perl.org - imager.git/blob - bench/benchform.perl
add new comparison method rgb_difference that resembles arithmetical difference per...
[imager.git] / bench / benchform.perl
1 #!perl -w
2 use strict;
3 <>; #drop the uname
4 my @text = <>;
5 $text[0] =~ s/\$VAR1/\$data/;
6 my $data;
7 eval join '', @text;
8 print <<EOS;
9                      |       closest      |      errdiff       |
10 algorithm |  image   | mono | addi |webmap| mono | addi |webmap|
11 EOS
12 for my $algo (qw(hashbox sortchan linsearch rand2dist)) {
13   for my $image (qw(rgbtile hsvgrad kscdisplay)) {
14     printf("%-10s|%-10s|", $algo, $image);
15     for my $tran (qw(closest errdiff)) {
16       for my $pal (qw(mono addi webmap)) {
17         printf("%6.2f|", $data->{$algo}{$image}{$tran}{$pal});
18       }
19     }
20     print "\n";
21   }
22 }
23
24 __END__
25
26 =head1 NAME
27
28  benchform.perl - formats quantbench.perl results into a table.
29
30 =head1 SYNOPSIS
31
32  perl benchform.perl quantbench.txt
33
34 =cut