From: gfx Date: Sun, 20 Dec 2009 07:39:07 +0000 (+0900) Subject: Improve a benchmark X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=33483c837325d20ebcdab0e5684fae3d65f95dbc;p=gitmo%2FMouse.git Improve a benchmark --- diff --git a/benchmarks/vs_caf_w_destructors.pl b/benchmarks/vs_caf_w_destructors.pl index 86fffe5..7d23977 100644 --- a/benchmarks/vs_caf_w_destructors.pl +++ b/benchmarks/vs_caf_w_destructors.pl @@ -8,7 +8,8 @@ use Moose; has foo => (is => 'rw'); - sub DEMOLISH { } + my $i = 0; + sub DEMOLISH { $i++ } __PACKAGE__->meta->make_immutable(); } { @@ -16,7 +17,8 @@ use Mouse; has foo => (is => 'rw'); - sub DEMOLISH { } + my $i = 0; + sub DEMOLISH { $i++ } __PACKAGE__->meta->make_immutable(); } { @@ -26,7 +28,8 @@ use base 'Class::Accessor::Fast'; __PACKAGE__->mk_accessors(qw(foo)); - sub DESTROY { } + my $i = 0; + sub DESTROY { $i++ } } use Benchmark qw(cmpthese);