From: Uri Guttman Date: Fri, 19 Dec 2008 06:00:18 +0000 (-0500) Subject: changed to use cmpthese X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ba84a4fcdf828ea4035c2fbc18f70dd664a39cd;p=urisagit%2FTemplate-Simple.git changed to use cmpthese --- diff --git a/bench.pl b/bench.pl index c8b289f..8dc354c 100644 --- a/bench.pl +++ b/bench.pl @@ -4,10 +4,10 @@ use strict ; use warnings ; use Template::Simple ; -use Benchmark qw( timethese ) ; +use Benchmark qw( timethese cmpthese ) ; use Data::Dumper ; -my @dims = @ARGV ? @ARGV : ( 3, 6 ) ; +my @dims = @ARGV ? (shift, shift) : ( 3, 5) ; my $data = generate_data( @dims ) ; #print Dumper $data ; @@ -51,7 +51,7 @@ print "OK [$ok]\n" ; # print $$joined ; #print $$comp_rendered ; -timethese( shift || -2, +cmpthese( shift || -2, { render => sub { my $x = $tmpl->render( 'bench', $data ) }, joined => sub { my $x = joined( $data ) },