← Index
NYTProf Performance Profile   « block view • line view • sub view »
For reply.pl
  Run on Thu Oct 21 22:40:13 2010
Reported on Thu Oct 21 22:44:38 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/vars.pm
StatementsExecuted 1260 statements in 6.96ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
4747305.06ms6.34msvars::::importvars::import
798311.28ms1.28msvars::::CORE:matchvars::CORE:match (opcode)
111233µs412µsvars::::BEGIN@7vars::BEGIN@7
11131µs31µsvars::::BEGIN@3vars::BEGIN@3
1119µs36µsvars::::BEGIN@8vars::BEGIN@8
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package vars;
2
3245µs131µs
# spent 31µs within vars::BEGIN@3 which was called: # once (31µs+0s) by Tie::RefHash::BEGIN@3 at line 3
use 5.006;
# spent 31µs making 1 call to vars::BEGIN@3
4
511µsour $VERSION = '1.02';
6
72246µs2590µs
# spent 412µs (233+178) within vars::BEGIN@7 which was called: # once (233µs+178µs) by Tie::RefHash::BEGIN@3 at line 7
use warnings::register;
# spent 412µs making 1 call to vars::BEGIN@7 # spent 178µs making 1 call to warnings::register::import
82234µs262µs
# spent 36µs (9+26) within vars::BEGIN@8 which was called: # once (9µs+26µs) by Tie::RefHash::BEGIN@3 at line 8
use strict qw(vars subs);
# spent 36µs making 1 call to vars::BEGIN@8 # spent 26µs making 1 call to strict::import
9
10
# spent 6.34ms (5.06+1.28) within vars::import which was called 47 times, avg 135µs/call: # once (728µs+191µs) by Regexp::Common::URI::RFC1738::BEGIN@33 at line 33 of Regexp/Common/URI/RFC1738.pm # once (709µs+190µs) by Regexp::Common::URI::RFC2396::BEGIN@32 at line 32 of Regexp/Common/URI/RFC2396.pm # once (646µs+170µs) by Regexp::Common::URI::RFC2806::BEGIN@42 at line 42 of Regexp/Common/URI/RFC2806.pm # once (601µs+167µs) by Regexp::Common::URI::RFC1808::BEGIN@40 at line 40 of Regexp/Common/URI/RFC1808.pm # once (209µs+55µs) by Regexp::Common::URI::RFC2384::BEGIN@28 at line 28 of Regexp/Common/URI/RFC2384.pm # once (143µs+37µs) by Regexp::Common::URI::RFC1035::BEGIN@24 at line 24 of Regexp/Common/URI/RFC1035.pm # once (142µs+26µs) by List::Util::BEGIN@12 at line 12 of List/Util.pm # once (112µs+28µs) by List::MoreUtils::BEGIN@8 at line 8 of List/MoreUtils.pm # once (92µs+23µs) by Text::Unidecode::BEGIN@7 at line 7 of Text/Unidecode.pm # once (94µs+22µs) by Params::Util::BEGIN@65 at line 65 of Params/Util.pm # once (89µs+23µs) by DBD::SQLite::BEGIN@9 at line 9 of DBD/SQLite.pm # once (83µs+23µs) by Regexp::Common::BEGIN@19 at line 19 of Regexp/Common.pm # once (82µs+19µs) by Regexp::Common::URI::RFC1808::BEGIN@19 at line 19 of Regexp/Common/URI/RFC1808.pm # once (81µs+20µs) by Scalar::Util::BEGIN@10 at line 10 of Scalar/Util.pm # once (81µs+19µs) by Regexp::Common::URI::RFC2396::BEGIN@11 at line 11 of Regexp/Common/URI/RFC2396.pm # once (80µs+19µs) by Regexp::Common::URI::RFC1035::BEGIN@11 at line 11 of Regexp/Common/URI/RFC1035.pm # once (79µs+19µs) by Regexp::Common::URI::RFC1738::BEGIN@11 at line 11 of Regexp/Common/URI/RFC1738.pm # once (77µs+19µs) by Regexp::Common::URI::RFC2806::BEGIN@12 at line 12 of Regexp/Common/URI/RFC2806.pm # once (76µs+19µs) by Regexp::Common::URI::RFC2384::BEGIN@13 at line 13 of Regexp/Common/URI/RFC2384.pm # once (50µs+13µs) by DBD::SQLite::BEGIN@8 at line 8 of DBD/SQLite.pm # once (49µs+13µs) by Tie::RefHash::Nestable::BEGIN@262 at line 262 of Tie/RefHash.pm # once (46µs+14µs) by constant::BEGIN@6 at line 6 of constant.pm # once (49µs+11µs) by Regexp::Common::URI::BEGIN@9 at line 9 of Regexp/Common/URI.pm # once (32µs+8µs) by namespace::clean::BEGIN@13 at line 13 of namespace/clean.pm # once (31µs+7µs) by Tie::RefHash::BEGIN@3 at line 3 of Tie/RefHash.pm # once (28µs+7µs) by Regexp::Common::URI::file::BEGIN@10 at line 10 of Regexp/Common/URI/file.pm # once (29µs+6µs) by Tie::RefHash::BEGIN@91 at line 91 of Tie/RefHash.pm # once (28µs+6µs) by Regexp::Common::URI::ftp::BEGIN@11 at line 11 of Regexp/Common/URI/ftp.pm # once (28µs+6µs) by Regexp::Common::URI::RFC1738::BEGIN@8 at line 8 of Regexp/Common/URI/RFC1738.pm # once (28µs+6µs) by Regexp::Common::URI::RFC1808::BEGIN@16 at line 16 of Regexp/Common/URI/RFC1808.pm # once (28µs+6µs) by Regexp::Common::URI::RFC2396::BEGIN@8 at line 8 of Regexp/Common/URI/RFC2396.pm # once (28µs+6µs) by Regexp::Common::URI::RFC1035::BEGIN@8 at line 8 of Regexp/Common/URI/RFC1035.pm # once (28µs+5µs) by Regexp::Common::URI::tv::BEGIN@13 at line 13 of Regexp/Common/URI/tv.pm # once (28µs+5µs) by Regexp::Common::URI::fax::BEGIN@11 at line 11 of Regexp/Common/URI/fax.pm # once (27µs+6µs) by Regexp::Common::URI::RFC2384::BEGIN@10 at line 10 of Regexp/Common/URI/RFC2384.pm # once (27µs+6µs) by Regexp::Common::URI::tel::BEGIN@11 at line 11 of Regexp/Common/URI/tel.pm # once (27µs+6µs) by Regexp::Common::URI::gopher::BEGIN@11 at line 11 of Regexp/Common/URI/gopher.pm # once (26µs+6µs) by base::BEGIN@4 at line 4 of base.pm # once (27µs+5µs) by Regexp::Common::URI::BEGIN@19 at line 19 of Regexp/Common/URI.pm # once (27µs+6µs) by Regexp::Common::URI::wais::BEGIN@11 at line 11 of Regexp/Common/URI/wais.pm # once (27µs+5µs) by Regexp::Common::URI::RFC2806::BEGIN@9 at line 9 of Regexp/Common/URI/RFC2806.pm # once (26µs+6µs) by Regexp::Common::URI::http::BEGIN@10 at line 10 of Regexp/Common/URI/http.pm # once (26µs+5µs) by Regexp::Common::URI::news::BEGIN@11 at line 11 of Regexp/Common/URI/news.pm # once (26µs+6µs) by Regexp::Common::URI::pop::BEGIN@11 at line 11 of Regexp/Common/URI/pop.pm # once (26µs+6µs) by Regexp::Common::URI::prospero::BEGIN@11 at line 11 of Regexp/Common/URI/prospero.pm # once (26µs+6µs) by Regexp::Common::URI::telnet::BEGIN@10 at line 10 of Regexp/Common/URI/telnet.pm # once (25µs+5µs) by DBD::SQLite::BEGIN@10 at line 10 of DBD/SQLite.pm
sub import {
1112526.43ms my $callpack = caller;
12 my (undef, @imports) = @_;
13 my ($sym, $ch);
14 foreach (@imports) {
15266627µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 627µs making 266 calls to vars::CORE:match, avg 2µs/call
16266340µs if ($sym =~ /\W/) {
# spent 340µs making 266 calls to vars::CORE:match, avg 1µs/call
17 # time for a more-detailed check-up
18 if ($sym =~ /^\w+[[{].*[]}]$/) {
19 require Carp;
20 Carp::croak("Can't declare individual elements of hash or array");
21 } elsif (warnings::enabled() and length($sym) == 1 and $sym !~ tr/a-zA-Z//) {
22 warnings::warn("No need to declare built-in vars");
23 } elsif (($^H &= strict::bits('vars'))) {
24 require Carp;
25 Carp::croak("'$_' is not a valid variable name under strict vars");
26 }
27 }
28266315µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 315µs making 266 calls to vars::CORE:match, avg 1µs/call
29 *$sym =
30 ( $ch eq "\$" ? \$$sym
31 : $ch eq "\@" ? \@$sym
32 : $ch eq "\%" ? \%$sym
33 : $ch eq "\*" ? \*$sym
34 : $ch eq "\&" ? \&$sym
35 : do {
36 require Carp;
37 Carp::croak("'$_' is not a valid variable name");
38 });
39 } else {
40 require Carp;
41 Carp::croak("'$_' is not a valid variable name");
42 }
43 }
44};
45
4613µs1;
47__END__
 
# spent 1.28ms within vars::CORE:match which was called 798 times, avg 2µs/call: # 266 times (627µs+0s) by vars::import at line 15, avg 2µs/call # 266 times (340µs+0s) by vars::import at line 16, avg 1µs/call # 266 times (315µs+0s) by vars::import at line 28, avg 1µs/call
sub vars::CORE:match; # opcode