8 <tr><th>System</th><th>PCRE</th><th>RE2</th></tr>
10 foreach my $sys (@sys) {
11 my $ns_pcre = $data{$sys}->{sprintf($name, "PCRE")}->{'ns/op'};
12 my $ns_re2 = $data{$sys}->{sprintf($name, "RE2")}->{'ns/op'};
13 printf "<tr><td>%s</td><td>%.1f µs</td><td>%.1f µs</td></tr>\n", $sysname{$sys}, $ns_pcre/1000., $ns_re2/1000.;
16 <tr height=5><td colspan=3></td></tr>
22 "8", "16", "32", "64", "128", "256", "512",
23 "1K", "2K", "4K", "8K", "16K", "32K", "64K", "128K", "256K", "512K",
24 "1M", "2M", "4M", "8M", "16M"
38 my $base = sprintf("regexp3g%d", ++$ngraph);
40 open(JGR
, ">$base.jgr") || die "open >$base.jgr: $!";
41 printf JGR
"bbox -20 -12 392 95\n";
42 printf JGR
"newgraph clip x_translate 0.25 y_translate 0.25\n";
46 foreach my $who ("PCRE", "RE2") {
47 printf JGR
"newcurve pts\n";
48 for(my $i=0; $i<@sizes; $i++) {
49 my $key = sprintf("%s%s/%s", $name, $who, $sizes[$i]);
50 my $val = $data{$sys}->{$key}->{'MB/s'};
51 next if !defined($val);
57 printf JGR
"$i %f (* %s *)\n", $val, $key;
59 my $color = $color{$who};
60 printf JGR
"marktype none color $color linethickness 2 linetype solid label : $who\n";
63 printf JGR
"xaxis min -1 max $n size 5 label : text size (bytes)\n";
64 printf JGR
" no_auto_hash_marks hash_labels fontsize 9\n";
65 for($i=0; $i<@sizes; $i+=3) {
66 printf JGR
" hash_at $i hash_label at $i : $sizes[$i]\n";
69 while(10*$y <= $ymax) {
72 for($i=2; $i<=10; $i++) {
78 foreach my $who ("PCRE", "RE2") {
87 printf JGR
"newstring x $x1 y $y1 hjl $v : $who\n";
89 printf JGR
"yaxis min 0 max $y size 1 label : speed (MB/s)\n";
90 printf JGR
" hash_labels fontsize 9\n";
91 # printf JGR "legend defaults font Times-Roman fontsize 10 x 0 y $y hjl vjt\n";
93 system("jgraph $base.jgr >$base.eps"); # die "system: $!";
94 system("gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dEPSCrop -sDEVICE=png16m -r100 -sOutputFile=$base.png -dBATCH -dQUIT -dQUIET -dNOPAUSE $base.eps");
96 printf "<img src=$base.png>\n"
109 @sys = ("r70", "c2", "wreck", "mini");
111 "r70" => "AMD Opteron 8214 HE, 2.2 GHz",
112 "c2" => "Intel Core2 Duo E7200, 2.53 GHz",
113 "wreck" => "Intel Xeon 5150, 2.66 GHz (Mac Pro)",
114 "mini" => "Intel Core2 T5600, 1.83 GHz (Mac Mini)",
123 foreach my $sys (@sys) {
124 open(F
, "benchlog.$sys") || die "open benchlog.$sys: $!";
127 if(/^([A-Za-z0-9_\/]+)\s
+(\d
+)\s
+(\d
+) ns\
/op/) {
132 if(/([\d.]+) MB\/s/){
135 $sysdat{$row{"name"}} = \
%row;
139 $data{$sys} = \
%sysdat;
144 if(/^<!-- benchlog (\w+) -->/) {
149 if(/^<!-- benchlog (\w+) ([%\w]+) -->/) {