Filename | /opt/perl-5.18.1/lib/site_perl/5.18.1/Object/Tiny/XS.pm |
Statements | Executed 15 statements in 506µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.08ms | 2.42ms | BEGIN@28 | Object::Tiny::XS::
1 | 1 | 1 | 107µs | 251µs | import | Object::Tiny::XS::
1 | 1 | 1 | 22µs | 22µs | new (xsub) | Object::Tiny::XS::
1 | 1 | 1 | 16µs | 31µs | BEGIN@2 | Object::Tiny::XS::
1 | 1 | 1 | 13µs | 13µs | BEGIN@4 | Object::Tiny::XS::
1 | 1 | 1 | 3µs | 3µs | CORE:match (opcode) | Object::Tiny::XS::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Object::Tiny::XS; | ||||
2 | 2 | 47µs | 2 | 46µ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 # 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 | ||||
5 | 1 | 9µs | require 5.004; | ||
6 | 1 | 5µs | $Object::Tiny::XS::VERSION = '1.01'; | ||
7 | 1 | 213µs | 1 | 13µ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 | ||||
10 | 1 | 500ns | return unless shift eq 'Object::Tiny::XS'; | ||
11 | 1 | 800ns | my $pkg = caller; | ||
12 | 1 | 4µs | my $child = !! @{"${pkg}::ISA"}; | ||
13 | 1 | 11µs | 1 | 3µ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 { | ||||
18 | 1 | 69µ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 '$_'"; | ||||
20 | 1 | 900ns | "'$_' => '$_'," | ||
21 | } @_), | ||||
22 | "};"; | ||||
23 | 1 | 100ns | die "Failed to generate $pkg" if $@; | ||
24 | 1 | 5µs | return 1; | ||
25 | } | ||||
26 | |||||
27 | use Class::XSAccessor | ||||
28 | 2 | 139µs | 2 | 2.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 # spent 2.42ms making 1 call to Object::Tiny::XS::BEGIN@28
# spent 142µs making 1 call to Class::XSAccessor::import |
29 | |||||
30 | 1 | 2µs | 1; | ||
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 | |||||
# spent 22µs within Object::Tiny::XS::new which was called:
# once (22µs+0s) by main::RUNTIME at line 156 of fastest.pl |