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

Filename/home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/5.22.1/strict.pm
StatementsExecuted 395 statements in 1.32ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2621204µs204µsstrict::::bitsstrict::bits
252512196µs384µsstrict::::unimportstrict::unimport
474743195µs212µsstrict::::importstrict::import
11153µs53µsstrict::::BEGIN@14strict::BEGIN@14
11133µs33µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
1118µs8µ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
31700ns$strict::VERSION = "1.09";
4
5# Verify that we're called correctly so that strictures will work.
6158µs240µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 33µs making 1 call to strict::CORE:regcomp # spent 8µ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 53µs within strict::BEGIN@14 which was called: # once (53µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 38
BEGIN {
1513µ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
271400ns my $bits = 0;
2816µs $bits |= $_ for values %bitmask;
29
301300ns my $inline_all_bits = $bits;
31111µs *all_bits = sub () { $inline_all_bits };
32
331200ns $bits = 0;
3412µs $bits |= $_ for values %explicit_bitmask;
35
361100ns my $inline_all_explicit_bits = $bits;
37114µs *all_explicit_bits = sub () { $inline_all_explicit_bits };
381297µs153µs}
# spent 53µs making 1 call to strict::BEGIN@14
39
40
# spent 204µs within strict::bits which was called 26 times, avg 8µs/call: # 24 times (188µs+0s) by strict::unimport at line 69, avg 8µs/call # 2 times (17µs+0s) by strict::import at line 62, avg 8µs/call
sub bits {
412613µs my $bits = 0;
42268µs my @wrong;
432632µs foreach my $s (@_) {
442739µs if (exists $bitmask{$s}) {
452743µs $^H |= $explicit_bitmask{$s};
46
472716µs $bits |= $bitmask{$s};
48 }
49 else {
50 push @wrong, $s;
51 }
52 }
532615µs if (@wrong) {
54 require Carp;
55 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
56 }
5726131µs $bits;
58}
59
60
# spent 212µs (195+17) within strict::import which was called 47 times, avg 5µs/call: # once (8µs+8µs) by vars::BEGIN@8 at line 8 of vars.pm # once (7µs+9µs) by base::BEGIN@4 at line 4 of base.pm # once (9µs+0s) by DateTime::BEGIN@5 at line 5 of DateTime.pm # once (7µs+0s) by Role::Tiny::With::BEGIN@3 at line 3 of Role/Tiny/With.pm # once (6µs+0s) by DateTime::Locale::FromData::BEGIN@3 at line 3 of DateTime/Locale/FromData.pm # once (6µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 7 of DateTime/Format/Alami/EN.pm # once (5µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (5µs+0s) by Params::Validate::Constants::BEGIN@3 at line 3 of Params/Validate/Constants.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 (5µs+0s) by Params::Validate::XS::BEGIN@3 at line 3 of Params/Validate/XS.pm # once (4µs+0s) by version::regex::BEGIN@3 at line 3 of version/regex.pm # once (4µs+0s) by DateTime::Format::Alami::BEGIN@7 at line 7 of DateTime/Format/Alami.pm # once (4µs+0s) by experimental::BEGIN@3 at line 3 of experimental.pm # once (4µs+0s) by DateTime::Helpers::BEGIN@3 at line 3 of DateTime/Helpers.pm # once (4µs+0s) by version::BEGIN@5 at line 5 of version.pm # once (4µs+0s) by DateTime::Duration::BEGIN@3 at line 3 of DateTime/Duration.pm # once (4µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (4µs+0s) by DateTime::Locale::BEGIN@5 at line 5 of DateTime/Locale.pm # once (4µs+0s) by Class::Singleton::BEGIN@19 at line 19 of Class/Singleton.pm # once (4µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (4µs+0s) by re::BEGIN@4 at line 4 of re.pm # once (4µs+0s) by DateTime::TimeZone::Local::BEGIN@3 at line 3 of DateTime/TimeZone/Local.pm # once (4µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (4µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm # once (4µs+0s) by DateTime::Infinite::BEGIN@3 at line 3 of DateTime/Infinite.pm # once (4µs+0s) by DateTime::TimeZone::OffsetOnly::BEGIN@3 at line 3 of DateTime/TimeZone/OffsetOnly.pm # once (4µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (4µs+0s) by DateTime::TimeZone::UTC::BEGIN@3 at line 3 of DateTime/TimeZone/UTC.pm # once (4µs+0s) by Try::Tiny::BEGIN@7 at line 7 of Try/Tiny.pm # once (4µs+0s) by DateTime::Locale::Util::BEGIN@3 at line 3 of DateTime/Locale/Util.pm # once (4µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (4µs+0s) by DateTime::TimeZone::OlsonDB::Change::BEGIN@3 at line 3 of DateTime/TimeZone/OlsonDB/Change.pm # once (4µs+0s) by Params::Validate::BEGIN@5 at line 5 of Params/Validate.pm # once (3µs+0s) by Sub::Util::BEGIN@7 at line 7 of Sub/Util.pm # once (3µs+0s) by version::vxs::BEGIN@5 at line 5 of version/vxs.pm # once (3µs+0s) by DateTime::Locale::Data::BEGIN@17 at line 17 of DateTime/Locale/Data.pm # once (3µs+0s) by Module::Implementation::BEGIN@5 at line 5 of Module/Implementation.pm # once (3µs+0s) by DateTime::TimeZone::Floating::BEGIN@3 at line 3 of DateTime/TimeZone/Floating.pm # once (3µs+0s) by DateTime::TimeZone::BEGIN@5 at line 5 of DateTime/TimeZone.pm # once (3µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (3µs+0s) by Role::Tiny::import at line 53 of Role/Tiny.pm # once (3µs+0s) by DateTime::TimeZone::Catalog::BEGIN@10 at line 10 of DateTime/TimeZone/Catalog.pm # once (3µs+0s) by parent::BEGIN@2 at line 2 of parent.pm # once (2µs+0s) by DateTime::Infinite::Future::BEGIN@72 at line 72 of DateTime/Infinite.pm # once (2µs+0s) by DateTime::Infinite::Past::BEGIN@97 at line 97 of DateTime/Infinite.pm # once (2µs+0s) by FakeLocale::BEGIN@123 at line 123 of DateTime/Infinite.pm
sub import {
614712µs shift;
6247420µs217µs $^H |= @_ ? &bits : all_bits | all_explicit_bits;
# spent 17µs making 2 calls to strict::bits, avg 8µs/call
63}
64
65
# spent 384µs (196+187) within strict::unimport which was called 25 times, avg 15µs/call: # once (14µs+17µs) by Role::Tiny::BEGIN@303 at line 303 of Role/Tiny.pm # once (10µs+9µs) by DateTime::Format::Alami::BEGIN@487 at line 487 of DateTime/Format/Alami.pm # once (9µs+9µs) by Carp::BEGIN@132 at line 132 of Carp.pm # once (9µs+8µs) by Carp::BEGIN@590 at line 590 of Carp.pm # once (9µs+8µs) by DateTime::Format::Alami::BEGIN@163 at line 163 of DateTime/Format/Alami.pm # once (8µs+8µs) by constant::BEGIN@40 at line 40 of constant.pm # once (8µs+8µs) by DateTime::Locale::FromData::BEGIN@70 at line 70 of DateTime/Locale/FromData.pm # once (8µs+8µs) by DateTime::Format::Alami::BEGIN@50 at line 50 of DateTime/Format/Alami.pm # once (8µs+8µs) by List::Util::BEGIN@31 at line 31 of List/Util.pm # once (8µs+8µs) by Module::Implementation::BEGIN@128 at line 128 of Module/Implementation.pm # once (8µs+7µs) by version::BEGIN@33 at line 33 of version.pm # once (8µs+7µs) by DateTime::Format::Alami::BEGIN@242 at line 242 of DateTime/Format/Alami.pm # once (8µs+7µs) by Carp::BEGIN@610 at line 610 of Carp.pm # once (8µs+7µs) by DateTime::Format::Alami::BEGIN@494 at line 494 of DateTime/Format/Alami.pm # once (8µs+7µs) by constant::BEGIN@90 at line 90 of constant.pm # once (7µs+7µs) by constant::BEGIN@65 at line 65 of constant.pm # once (7µs+7µs) by constant::BEGIN@141 at line 141 of constant.pm # once (7µs+7µs) by parent::BEGIN@21 at line 21 of parent.pm # once (7µs+7µs) by version::BEGIN@52 at line 52 of version.pm # once (7µs+7µs) by version::BEGIN@70 at line 70 of version.pm # once (7µs+6µs) by File::Spec::Unix::BEGIN@182 at line 182 of File/Spec/Unix.pm # once (7µs+6µs) by DateTime::Infinite::BEGIN@14 at line 14 of DateTime/Infinite.pm # once (6µs+6µs) by DateTime::Locale::FromData::BEGIN@89 at line 89 of DateTime/Locale/FromData.pm # once (6µs+6µs) by FakeLocale::BEGIN@166 at line 166 of DateTime/Infinite.pm # once (6µs+0s) by POSIX::BEGIN@206 at line 206 of POSIX.pm
sub unimport {
66257µs shift;
67
6825125µs if (@_) {
692450µs24188µs $^H &= ~&bits;
# spent 188µs making 24 calls to strict::bits, avg 8µs/call
70 }
71 else {
7212µs $^H &= ~all_bits;
7311µs $^H |= all_explicit_bits;
74 }
75}
76
77112µs1;
78__END__
 
# spent 8µs within strict::CORE:match which was called: # once (8µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 6
sub strict::CORE:match; # opcode
# spent 33µs within strict::CORE:regcomp which was called: # once (33µs+0s) by DateTime::Format::Alami::EN::BEGIN@7 at line 6
sub strict::CORE:regcomp; # opcode