← 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:41 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/Object/Tiny.pm
StatementsExecuted 15 statements in 393µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11190µs94µsObject::Tiny::::importObject::Tiny::import
11121µs21µsObject::Tiny::::BEGIN@4Object::Tiny::BEGIN@4
11116µs31µsObject::Tiny::::BEGIN@3Object::Tiny::BEGIN@3
1114µs4µsObject::Tiny::::newObject::Tiny::new
1114µs4µsObject::Tiny::::CORE:matchObject::Tiny::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;
2
3253µs247µs
# spent 31µs (16+16) within Object::Tiny::BEGIN@3 which was called: # once (16µs+16µs) by Foo::Object::Tiny::BEGIN@143 at line 3
use strict 'vars', 'subs';
# spent 31µs making 1 call to Object::Tiny::BEGIN@3 # spent 16µs making 1 call to strict::import
4
# spent 21µs within Object::Tiny::BEGIN@4 which was called: # once (21µs+0s) by Foo::Object::Tiny::BEGIN@143 at line 7
BEGIN {
5117µs require 5.004;
616µs $Object::Tiny::VERSION = '1.08';
71222µs121µs}
# spent 21µs making 1 call to Object::Tiny::BEGIN@4
8
9
# spent 94µs (90+4) within Object::Tiny::import which was called: # once (90µs+4µs) by Foo::Object::Tiny::BEGIN@143 at line 143 of fastest.pl
sub import {
101600ns return unless shift eq 'Object::Tiny';
111900ns my $pkg = caller;
1214µs my $child = !! @{"${pkg}::ISA"};
13112µs14µs eval join "\n",
# spent 4µs making 1 call to Object::Tiny::CORE:match
14 "package $pkg;",
15 ($child ? () : "\@${pkg}::ISA = 'Object::Tiny';"),
16 map {
17162µs defined and ! ref and /^[^\W\d]\w*\z/s
# spent 10µs executing statements in string eval
18 or die "Invalid accessor name '$_'";
1911µs "sub $_ { return \$_[0]->{$_} }"
20 } @_;
211100ns die "Failed to generate $pkg" if $@;
2216µs return 1;
23}
24
25
# spent 4µs within Object::Tiny::new which was called: # once (4µs+0s) by main::RUNTIME at line 145 of fastest.pl
sub new {
261500ns my $class = shift;
2715µs bless { @_ }, $class;
28}
29
3013µs1;
31
32__END__
 
# spent 4µs within Object::Tiny::CORE:match which was called: # once (4µs+0s) by Object::Tiny::import at line 13
sub Object::Tiny::CORE:match; # opcode