From: Fuji, Goro Date: Sun, 7 Nov 2010 13:03:35 +0000 (+0900) Subject: Update benchmarks X-Git-Tag: 0.83~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=7deba168d673682bc4b82fe0741cd6720fb6b3d2 Update benchmarks --- diff --git a/author/pp-vs-xs-with-forking.pl b/author/pp-vs-xs-with-forking.pl index 816113e..76b563d 100644 --- a/author/pp-vs-xs-with-forking.pl +++ b/author/pp-vs-xs-with-forking.pl @@ -10,8 +10,9 @@ use Encode (); # pre-load for Interface::Test use HTTP::Request (); sub new_he{ - my($use_pp) = @_; + my($use_pp, $any_moose) = @_; $ENV{MOUSE_PUREPERL} = $use_pp; + $ENV{ANY_MOOSE} = $any_moose if defined $any_moose; require HTTP::Engine; @@ -30,7 +31,7 @@ sub new_he{ my $req = HTTP::Request->new(GET => 'http://localhost/'); print "load HTTP::Engine, new(), and run()\n"; -cmpthese -1 => { +cmpthese -2 => { 'XS' => sub { my $he = new_he(0); $he->run($req, env => \%ENV); @@ -39,10 +40,14 @@ cmpthese -1 => { my $he = new_he(1); $he->run($req, env => \%ENV); }, + 'Moose' => sub { + my $he = new_he(0, 'Moose'); + $he->run($req, env => \%ENV); + }, }; print "load HTTP::Engine, new(), and run() * 100\n"; -cmpthese -1 => { +cmpthese -2 => { 'XS' => sub { my $he = new_he(0); $he->run($req, env => \%ENV) for 1 .. 100; @@ -51,5 +56,9 @@ cmpthese -1 => { my $he = new_he(1); $he->run($req, env => \%ENV) for 1 .. 100; }, + 'Moose' => sub { + my $he = new_he(0, 'Moose'); + $he->run($req, env => \%ENV) for 1 .. 100; + }, };