This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
# with "Class-MOP/topic/unified-method-generation-w-xs" and" Moose/topic/xs-accessor" | |
use strict; | |
use Benchmark qw(:all); | |
use Config; printf "Perl/%vd in $Config{archname}\n\n", $^V; | |
use warnings; | |
no warnings 'once'; | |
my $cxsa_is_loaded = eval q{ | |
package CXSA; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a result of http://gist.github.com/171785 | |
Perl/5.10.0 in i686-linux | |
Moose/0.89 (Class::MOP/0.92) | |
Mouse/0.27 | |
Class::XSAccessor/1.03 | |
MoosePlain: Inline | |
MooseXS: XS | |
GETTING for simple attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl -w | |
use strict; | |
use PadWalker qw(var_name); | |
sub validate(\@@){ | |
my $args = shift; | |
foreach my $var(@_){ | |
print var_name(1, \$var), "\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a result of http://gist.github.com/171785 | |
Perl/5.10.1 in i686-linux | |
Moose/0.89 (Class::MOP/0.92) | |
Mouse/0.27 | |
Class::XSAccessor/1.03 | |
MoosePlain: Inline | |
MooseXS: XS | |
GETTING for simple attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tweak/method_common | |
$ ./miniperl gfx/method_call.pl | |
Rate pp_method pp_method_named | |
pp_method 3185778/s -- -9% | |
pp_method_named 3495252/s 10% -- | |
$ ./miniperl gfx/method_call.pl | |
Rate pp_method pp_method_named | |
pp_method 3329679/s -- -7% | |
pp_method_named 3563122/s 7% -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# blead | |
$ ./miniperl gfx/method_call.pl | |
Rate pp_method pp_method_named | |
pp_method 2752511/s -- -13% | |
pp_method_named 3163807/s 15% -- | |
$ ./miniperl gfx/method_call.pl | |
Rate pp_method pp_method_named | |
pp_method 2733378/s -- -17% | |
pp_method_named 3300471/s 21% -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use Test::LeakTrace qw(leaktrace); | |
for my $x (qw(Date::Manip)){ | |
eval "use $x"; | |
leaktrace { | |
eval { | |
$x->import(); | |
}; | |
} '-verbose'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl -w | |
use strict; | |
use Test::More tests => 3; | |
{ | |
package T; | |
use Tie::Hash(); | |
use base qw(Tie::StdHash); | |
sub FETCH{ | |
my($self, $key) = @_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
筑波の雨はだいぶおさまった模様 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package A; | |
sub DESTROY{ warn "DESTROY!" } | |
sub f{ | |
my $a = bless {}, 'A'; | |
goto &g; | |
} | |
sub g{ | |
warn "g!"; |
OlderNewer