← Index
NYTProf Performance Profile   « line view »
For -e
  Run on Thu Jun 30 16:34:56 2016
Reported on Thu Jun 30 16:35:08 2016

Filename/home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/5.22.1/strict.pm
StatementsExecuted 432 statements in 1.11ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2921194µs194µsstrict::::bitsstrict::bits
272713180µs348µsstrict::::unimportstrict::unimport
494945154µs180µsstrict::::importstrict::import
11138µs38µsstrict::::BEGIN@14strict::BEGIN@14
11128µs28µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
1117µs7µsstrict::::CORE:matchstrict::CORE:match (opcode)
0000s0sstrict::::__ANON__[:31]strict::__ANON__[:31]
0000s0sstrict::::__ANON__[:37]strict::__ANON__[:37]
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
31600ns$strict::VERSION = "1.09";
4
5# Verify that we're called correctly so that strictures will work.
6148µs235µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 28µs making 1 call to strict::CORE:regcomp # spent 7µ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
121300nsmy ( %bitmask, %explicit_bitmask );
13
14
# spent 38µs within strict::BEGIN@14 which was called: # once (38µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 38
BEGIN {
1512µs %bitmask = (
16 refs => 0x00000002,
17 subs => 0x00000200,
18 vars => 0x00000400,
19 );
20
2111µs %explicit_bitmask = (
22 refs => 0x00000020,
23 subs => 0x00000040,
24 vars => 0x00000080,
25 );
26
271300ns my $bits = 0;
2815µs $bits |= $_ for values %bitmask;
29
301200ns my $inline_all_bits = $bits;
3119µs *all_bits = sub () { $inline_all_bits };
32
331100ns $bits = 0;
3412µs $bits |= $_ for values %explicit_bitmask;
35
361100ns my $inline_all_explicit_bits = $bits;
37110µs *all_explicit_bits = sub () { $inline_all_explicit_bits };
381243µs138µs}
# spent 38µs making 1 call to strict::BEGIN@14
39
40
# spent 194µs within strict::bits which was called 29 times, avg 7µs/call: # 26 times (168µs+0s) by strict::unimport at line 69, avg 6µs/call # 3 times (26µs+0s) by strict::import at line 62, avg 9µs/call
sub bits {
412912µs my $bits = 0;
42297µs my @wrong;
432929µs foreach my $s (@_) {
443136µs if (exists $bitmask{$s}) {
453142µs $^H |= $explicit_bitmask{$s};
46
473114µs $bits |= $bitmask{$s};
48 }
49 else {
50 push @wrong, $s;
51 }
52 }
532919µs if (@wrong) {
54 require Carp;
55 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
56 }
5729124µs $bits;
58}
59
60
# spent 180µs (154+26) within strict::import which was called 49 times, avg 4µs/call: # once (7µs+13µs) by Class::Inspector::BEGIN@45 at line 45 of Class/Inspector.pm # once (6µs+6µs) by vars::BEGIN@8 at line 8 of vars.pm # once (5µs+7µs) by base::BEGIN@4 at line 4 of base.pm # once (8µs+0s) by Role::Tiny::With::BEGIN@3 at line 3 of Role/Tiny/With.pm # once (5µs+0s) by DateTime::Locale::FromData::BEGIN@3 at line 3 of DateTime/Locale/FromData.pm # once (5µs+0s) by Role::Tiny::BEGIN@6 at line 6 of Role/Tiny.pm # once (5µs+0s) by Parse::Number::EN::BEGIN@9 at line 9 of Parse/Number/EN.pm # once (4µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 7 of lib/DateTime/Format/Alami/EN.pm # once (4µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (4µs+0s) by DateTime::Format::Alami::BEGIN@7 at line 7 of lib/DateTime/Format/Alami.pm # once (4µs+0s) by Data::Graph::Util::BEGIN@7 at line 7 of Data/Graph/Util.pm # once (4µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (3µs+0s) by Try::Tiny::BEGIN@7 at line 7 of Try/Tiny.pm # once (3µs+0s) by version::regex::BEGIN@3 at line 3 of version/regex.pm # once (3µs+0s) by DateTime::Duration::BEGIN@3 at line 3 of DateTime/Duration.pm # once (3µs+0s) by DateTime::Infinite::BEGIN@3 at line 3 of DateTime/Infinite.pm # once (3µs+0s) by DateTime::BEGIN@5 at line 5 of DateTime.pm # once (3µs+0s) by DateTime::Locale::Data::BEGIN@17 at line 17 of DateTime/Locale/Data.pm # once (3µs+0s) by Sub::Util::BEGIN@7 at line 7 of Sub/Util.pm # once (3µs+0s) by Class::Singleton::BEGIN@19 at line 19 of Class/Singleton.pm # once (3µs+0s) by Params::Validate::BEGIN@5 at line 5 of Params/Validate.pm # once (3µs+0s) by experimental::BEGIN@3 at line 3 of experimental.pm # once (3µs+0s) by DateTime::Helpers::BEGIN@3 at line 3 of DateTime/Helpers.pm # once (3µs+0s) by re::BEGIN@4 at line 4 of re.pm # once (3µs+0s) by version::BEGIN@5 at line 5 of version.pm # once (2µs+0s) by DateTime::Infinite::Future::BEGIN@72 at line 72 of DateTime/Infinite.pm # once (2µs+0s) by Params::Validate::XS::BEGIN@3 at line 3 of Params/Validate/XS.pm # once (2µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (2µs+0s) by DateTime::TimeZone::Floating::BEGIN@3 at line 3 of DateTime/TimeZone/Floating.pm # once (2µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (2µs+0s) by DateTime::TimeZone::OlsonDB::Change::BEGIN@3 at line 3 of DateTime/TimeZone/OlsonDB/Change.pm # once (2µs+0s) by Role::Tiny::import at line 53 of Role/Tiny.pm # once (2µs+0s) by Module::Implementation::BEGIN@5 at line 5 of Module/Implementation.pm # once (2µs+0s) by DateTime::TimeZone::BEGIN@5 at line 5 of DateTime/TimeZone.pm # once (2µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (2µs+0s) by DateTime::Locale::BEGIN@5 at line 5 of DateTime/Locale.pm # once (2µs+0s) by Params::Validate::Constants::BEGIN@3 at line 3 of Params/Validate/Constants.pm # once (2µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (2µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm # once (2µs+0s) by DateTime::TimeZone::OffsetOnly::BEGIN@3 at line 3 of DateTime/TimeZone/OffsetOnly.pm # once (2µs+0s) by version::vxs::BEGIN@5 at line 5 of version/vxs.pm # once (2µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (2µs+0s) by DateTime::TimeZone::Local::BEGIN@3 at line 3 of DateTime/TimeZone/Local.pm # once (2µs+0s) by DateTime::TimeZone::Catalog::BEGIN@10 at line 10 of DateTime/TimeZone/Catalog.pm # once (2µs+0s) by DateTime::Locale::Util::BEGIN@3 at line 3 of DateTime/Locale/Util.pm # once (2µs+0s) by parent::BEGIN@2 at line 2 of parent.pm # once (2µs+0s) by DateTime::TimeZone::UTC::BEGIN@3 at line 3 of DateTime/TimeZone/UTC.pm # once (2µs+0s) by FakeLocale::BEGIN@123 at line 123 of DateTime/Infinite.pm # once (2µs+0s) by DateTime::Infinite::Past::BEGIN@97 at line 97 of DateTime/Infinite.pm
sub import {
614912µs shift;
6249321µs326µs $^H |= @_ ? &bits : all_bits | all_explicit_bits;
# spent 26µs making 3 calls to strict::bits, avg 9µs/call
63}
64
65
# spent 348µs (180+168) within strict::unimport which was called 27 times, avg 13µs/call: # once (16µs+19µs) by Role::Tiny::BEGIN@303 at line 303 of Role/Tiny.pm # once (11µs+10µs) by DateTime::Format::Alami::BEGIN@497 at line 497 of lib/DateTime/Format/Alami.pm # once (11µs+8µs) by Carp::BEGIN@132 at line 132 of Carp.pm # once (9µs+8µs) by DateTime::Infinite::BEGIN@14 at line 14 of DateTime/Infinite.pm # once (8µs+7µs) by constant::BEGIN@40 at line 40 of constant.pm # once (7µs+7µs) by DateTime::Locale::FromData::BEGIN@70 at line 70 of DateTime/Locale/FromData.pm # once (7µs+8µs) by Class::Inspector::BEGIN@540 at line 540 of Class/Inspector.pm # once (7µs+6µs) by Carp::BEGIN@590 at line 590 of Carp.pm # once (6µs+6µs) by List::Util::BEGIN@31 at line 31 of List/Util.pm # once (6µs+6µs) by DateTime::Format::Alami::BEGIN@247 at line 247 of lib/DateTime/Format/Alami.pm # once (6µs+6µs) by DateTime::Format::Alami::BEGIN@50 at line 50 of lib/DateTime/Format/Alami.pm # once (6µs+6µs) by Module::Implementation::BEGIN@128 at line 128 of Module/Implementation.pm # once (6µs+5µs) by DateTime::Format::Alami::BEGIN@160 at line 160 of lib/DateTime/Format/Alami.pm # once (6µs+6µs) by File::Spec::Unix::BEGIN@182 at line 182 of File/Spec/Unix.pm # once (6µs+5µs) by Class::Inspector::BEGIN@553 at line 553 of Class/Inspector.pm # once (6µs+5µs) by version::BEGIN@33 at line 33 of version.pm # once (5µs+5µs) by parent::BEGIN@21 at line 21 of parent.pm # once (6µs+5µs) by constant::BEGIN@90 at line 90 of constant.pm # once (6µs+5µs) by constant::BEGIN@141 at line 141 of constant.pm # once (5µs+5µs) by constant::BEGIN@65 at line 65 of constant.pm # once (5µs+5µs) by Carp::BEGIN@610 at line 610 of Carp.pm # once (5µs+5µs) by DateTime::Format::Alami::BEGIN@504 at line 504 of lib/DateTime/Format/Alami.pm # once (5µs+5µs) by version::BEGIN@52 at line 52 of version.pm # once (5µs+5µs) by version::BEGIN@70 at line 70 of version.pm # once (5µs+5µs) by FakeLocale::BEGIN@166 at line 166 of DateTime/Infinite.pm # once (4µs+4µs) by DateTime::Locale::FromData::BEGIN@89 at line 89 of DateTime/Locale/FromData.pm # once (4µs+0s) by POSIX::BEGIN@206 at line 206 of POSIX.pm
sub unimport {
66276µs shift;
67
6827112µs if (@_) {
692645µs26168µs $^H &= ~&bits;
# spent 168µs making 26 calls to strict::bits, avg 6µs/call
70 }
71 else {
7211µs $^H &= ~all_bits;
731800ns $^H |= all_explicit_bits;
74 }
75}
76
7719µs1;
78__END__
 
# spent 7µs within strict::CORE:match which was called: # once (7µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 6
sub strict::CORE:match; # opcode
# spent 28µs within strict::CORE:regcomp which was called: # once (28µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 6
sub strict::CORE:regcomp; # opcode