← Index
NYTProf Performance Profile   « line view »
For ../dm5dm6_ex3
  Run on Mon Feb 23 08:36:56 2015
Reported on Mon Feb 23 08:37:02 2015

Filename/usr/lib/perl5/5.20.1/strict.pm
StatementsExecuted 635 statements in 452µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
4721210µs210µsstrict::::bitsstrict::bits
32322798µs254µsstrict::::importstrict::import
1515950µs105µsstrict::::unimportstrict::unimport
11112µs12µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
1112µs2µsstrict::::CORE:matchstrict::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 strict;
2
31200ns$strict::VERSION = "1.08";
4
5# Verify that we're called correctly so that strictures will work.
6120µs214µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 12µs making 1 call to strict::CORE:regcomp # spent 2µs making 1 call to strict::CORE:match
7 # Can't use Carp, since Carp uses us!
8 my (undef, $f, $l) = caller;
9 die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
10}
11
1211µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
171500nsmy %explicit_bitmask = (
18refs => 0x00000020,
19subs => 0x00000040,
20vars => 0x00000080
21);
22
23
# spent 210µs within strict::bits which was called 47 times, avg 4µs/call: # 32 times (155µs+0s) by strict::import at line 44, avg 5µs/call # 15 times (55µs+0s) by strict::unimport at line 49, avg 4µs/call
sub bits {
244711µs my $bits = 0;
25475µs my @wrong;
264728µs foreach my $s (@_) {
2710030µs if (exists $bitmask{$s}) {
2810046µs $^H |= $explicit_bitmask{$s};
29 }
30 else { push @wrong, $s };
3110048µs $bits |= $bitmask{$s} || 0;
32 }
334710µs if (@wrong) {
34 require Carp;
35 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
36 }
374790µs $bits;
38}
39
401500nsmy @default_bits = qw(refs subs vars);
41
42
# spent 254µs (98+155) within strict::import which was called 32 times, avg 8µs/call: # once (12µs+9µs) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (5µs+9µs) by Date::Manip::TZ::amnew_00::BEGIN@17 at line 17 of Date/Manip/TZ/amnew_00.pm # once (5µs+7µs) by Date::Manip::Obj::BEGIN@11 at line 11 of Date/Manip/Obj.pm # once (4µs+8µs) by Date::Manip::Delta::BEGIN@19 at line 19 of Date/Manip/Delta.pm # once (4µs+6µs) by Date::Manip::Lang::english::BEGIN@11 at line 11 of Date/Manip/Lang/english.pm # once (4µs+6µs) by main::BEGIN@8 at line 8 of ../dm5dm6_ex3 # once (3µs+5µs) by Date::Manip::Date::BEGIN@1 at line 1 of Tie/Hash/NamedCapture.pm # once (3µs+5µs) by Config::BEGIN@9 at line 9 of Config.pm # once (3µs+5µs) by Date::Manip::Zones::BEGIN@16 at line 16 of Date/Manip/Zones.pm # once (3µs+5µs) by Date::Manip::Lang::index::BEGIN@24 at line 24 of Date/Manip/Lang/index.pm # once (3µs+5µs) by Encode::Config::BEGIN@7 at line 7 of Encode/Config.pm # once (3µs+5µs) by Encode::Alias::BEGIN@2 at line 2 of Encode/Alias.pm # once (3µs+5µs) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (3µs+4µs) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm # once (2µs+5µs) by IO::Handle::BEGIN@264 at line 264 of IO/Handle.pm # once (3µs+5µs) by Encode::Encoding::BEGIN@4 at line 4 of Encode/Encoding.pm # once (3µs+4µs) by IO::File::BEGIN@128 at line 128 of IO/File.pm # once (2µs+4µs) by Carp::BEGIN@4 at line 4 of Carp.pm # once (2µs+4µs) by Date::Manip::Date::BEGIN@19 at line 19 of Date/Manip/Date.pm # once (2µs+5µs) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm # once (2µs+4µs) by Encode::BEGIN@5 at line 5 of Encode.pm # once (2µs+5µs) by Date::Manip::TZ_Base::BEGIN@11 at line 11 of Date/Manip/TZ_Base.pm # once (2µs+4µs) by constant::BEGIN@3 at line 3 of constant.pm # once (2µs+4µs) by vars::BEGIN@8 at line 8 of vars.pm # once (2µs+4µs) by Date::Manip::TZ::BEGIN@20 at line 20 of Date/Manip/TZ.pm # once (2µs+3µs) by Date::Manip::Base::BEGIN@1409 at line 1409 of Date/Manip/Base.pm # once (2µs+4µs) by IO::BEGIN@7 at line 7 of IO.pm # once (2µs+3µs) by Date::Manip::TZ::BEGIN@189 at line 189 of Date/Manip/TZ.pm # once (2µs+3µs) by Date::Manip::Base::BEGIN@19 at line 19 of Date/Manip/Base.pm # once (2µs+2µs) by Date::Manip::TZ_Base::BEGIN@403 at line 403 of Date/Manip/TZ_Base.pm # once (2µs+2µs) by Date::Manip::TZ::BEGIN@1586 at line 1586 of Date/Manip/TZ.pm # once (2µs+2µs) by Date::Manip::Base::BEGIN@1474 at line 1474 of Date/Manip/Base.pm
sub import {
43325µs shift;
4432101µs32155µs $^H |= bits(@_ ? @_ : @default_bits);
# spent 155µs making 32 calls to strict::bits, avg 5µs/call
45}
46
47
# spent 105µs (50+55) within strict::unimport which was called 15 times, avg 7µs/call: # once (6µs+4µs) by IO::Handle::BEGIN@631 at line 631 of IO/Handle.pm # once (5µs+4µs) by Carp::BEGIN@131 at line 131 of Carp.pm # once (4µs+5µs) by Date::Manip::Base::BEGIN@1339 at line 1339 of Date/Manip/Base.pm # once (4µs+4µs) by Date::Manip::TZ_Base::BEGIN@399 at line 399 of Date/Manip/TZ_Base.pm # once (3µs+4µs) by Carp::BEGIN@555 at line 555 of Carp.pm # once (3µs+4µs) by Date::Manip::TZ::BEGIN@1582 at line 1582 of Date/Manip/TZ.pm # once (4µs+3µs) by Time::HiRes::BEGIN@43 at line 43 of Time/HiRes.pm # once (3µs+4µs) by constant::BEGIN@39 at line 39 of constant.pm # once (3µs+4µs) by Date::Manip::TZ::BEGIN@158 at line 158 of Date/Manip/TZ.pm # once (3µs+3µs) by constant::BEGIN@126 at line 126 of constant.pm # once (3µs+3µs) by Config::BEGIN@47 at line 47 of Config.pm # once (2µs+4µs) by constant::BEGIN@64 at line 64 of constant.pm # once (3µs+3µs) by Date::Manip::Base::BEGIN@1470 at line 1470 of Date/Manip/Base.pm # once (2µs+3µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (2µs+3µs) by Carp::BEGIN@575 at line 575 of Carp.pm
sub unimport {
48152µs shift;
491548µs1555µs $^H &= ~ bits(@_ ? @_ : @default_bits);
# spent 55µs making 15 calls to strict::bits, avg 4µs/call
50}
51
5216µs1;
53__END__
 
# spent 2µs within strict::CORE:match which was called: # once (2µs+0s) by main::BEGIN@8 at line 6
sub strict::CORE:match; # opcode
# spent 12µs within strict::CORE:regcomp which was called: # once (12µs+0s) by main::BEGIN@8 at line 6
sub strict::CORE:regcomp; # opcode