← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:42 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/Object/Tiny/XS.pm
StatementsExecuted 15 statements in 506µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.08ms2.42msObject::Tiny::XS::::BEGIN@28Object::Tiny::XS::BEGIN@28
111107µs251µsObject::Tiny::XS::::importObject::Tiny::XS::import
11122µs22µsObject::Tiny::XS::::newObject::Tiny::XS::new (xsub)
11116µs31µsObject::Tiny::XS::::BEGIN@2Object::Tiny::XS::BEGIN@2
11113µs13µsObject::Tiny::XS::::BEGIN@4Object::Tiny::XS::BEGIN@4
1113µs3µsObject::Tiny::XS::::CORE:matchObject::Tiny::XS::CORE:match (opcode)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Object::Tiny::XS;
2247µs246µs
# spent 31µs (16+15) within Object::Tiny::XS::BEGIN@2 which was called: # once (16µs+15µs) by Foo::Object::Tiny::XS::BEGIN@154 at line 2
use strict 'vars', 'subs';
# spent 31µs making 1 call to Object::Tiny::XS::BEGIN@2 # spent 15µs making 1 call to strict::import
3
4
# spent 13µs within Object::Tiny::XS::BEGIN@4 which was called: # once (13µs+0s) by Foo::Object::Tiny::XS::BEGIN@154 at line 7
BEGIN {
519µs require 5.004;
615µs $Object::Tiny::XS::VERSION = '1.01';
71213µs113µs}
# spent 13µs making 1 call to Object::Tiny::XS::BEGIN@4
8
9
# spent 251µs (107+143) within Object::Tiny::XS::import which was called: # once (107µs+143µs) by Foo::Object::Tiny::XS::BEGIN@154 at line 154 of fastest.pl
sub import {
101500ns return unless shift eq 'Object::Tiny::XS';
111800ns my $pkg = caller;
1214µs my $child = !! @{"${pkg}::ISA"};
13111µs13µs eval join "\n",
# spent 3µs making 1 call to Object::Tiny::XS::CORE:match
14 "package $pkg;",
15 ($child ? () : "\@${pkg}::ISA = 'Object::Tiny::XS';"),
16 "use Class::XSAccessor getters => {",
17 (map {
18169µs defined and ! ref and /^[^\W\d]\w*$/s
# spent 31µs executing statements in string eval
# includes 13µs spent executing 1 call to 1 sub defined therein.
19 or die "Invalid accessor name '$_'";
201900ns "'$_' => '$_',"
21 } @_),
22 "};";
231100ns die "Failed to generate $pkg" if $@;
2415µs return 1;
25}
26
27use Class::XSAccessor
282139µs22.56ms
# spent 2.42ms (1.08+1.34) within Object::Tiny::XS::BEGIN@28 which was called: # once (1.08ms+1.34ms) by Foo::Object::Tiny::XS::BEGIN@154 at line 28
constructor => 'new';
# spent 2.42ms making 1 call to Object::Tiny::XS::BEGIN@28 # spent 142µs making 1 call to Class::XSAccessor::import
29
3012µs1;
31
32__END__
 
# spent 3µs within Object::Tiny::XS::CORE:match which was called: # once (3µs+0s) by Object::Tiny::XS::import at line 13
sub Object::Tiny::XS::CORE:match; # opcode
# spent 22µs within Object::Tiny::XS::new which was called: # once (22µs+0s) by main::RUNTIME at line 156 of fastest.pl
sub Object::Tiny::XS::new; # xsub