← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/pan_genome_post_analysis
  Run on Fri Mar 27 11:43:32 2015
Reported on Fri Mar 27 11:45:25 2015

Filename/Users/ap13/perl5/perlbrew/perls/perl-5.16.2/lib/5.16.2/overloading.pm
StatementsExecuted 18 statements in 479µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
33236µs36µsoverloading::::unimportoverloading::unimport
11124µs37µsoverloading::::BEGIN@2overloading::BEGIN@2
0000s0soverloading::::_ops_to_numsoverloading::_ops_to_nums
0000s0soverloading::::importoverloading::import
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package overloading;
22406µs250µs
# spent 37µs (24+13) within overloading::BEGIN@2 which was called: # once (24µs+13µs) by overload::BEGIN@85 at line 2
use warnings;
# spent 37µs making 1 call to overloading::BEGIN@2 # spent 13µs making 1 call to warnings::import
3
41900nsour $VERSION = '0.02';
5
61400nsmy $HINT_NO_AMAGIC = 0x01000000; # see perl.h
7
8118µsrequire 5.010001;
9
10sub _ops_to_nums {
11 require overload::numbers;
12
13 map { exists $overload::numbers::names{"($_"}
14 ? $overload::numbers::names{"($_"}
15 : do { require Carp; Carp::croak("'$_' is not a valid overload") }
16 } @_;
17}
18
19sub import {
20 my ( $class, @ops ) = @_;
21
22 if ( @ops ) {
23 if ( $^H{overloading} ) {
24 vec($^H{overloading} , $_, 1) = 0 for _ops_to_nums(@ops);
25 }
26
27 if ( $^H{overloading} !~ /[^\0]/ ) {
28 delete $^H{overloading};
29 $^H &= ~$HINT_NO_AMAGIC;
30 }
31 } else {
32 delete $^H{overloading};
33 $^H &= ~$HINT_NO_AMAGIC;
34 }
35}
36
37
# spent 36µs within overloading::unimport which was called 3 times, avg 12µs/call: # once (16µs+0s) by overload::BEGIN@85 at line 85 of overload.pm # once (10µs+0s) by B::Deparse::BEGIN@4020 at line 4023 of B/Deparse.pm # once (10µs+0s) by overload::BEGIN@116 at line 116 of overload.pm
sub unimport {
381246µs my ( $class, @ops ) = @_;
39
40 if ( exists $^H{overloading} or not $^H & $HINT_NO_AMAGIC ) {
41 if ( @ops ) {
42 vec($^H{overloading} ||= '', $_, 1) = 1 for _ops_to_nums(@ops);
43 } else {
44 delete $^H{overloading};
45 }
46 }
47
48 $^H |= $HINT_NO_AMAGIC;
49}
50
5117µs1;
52__END__