← Index
NYTProf Performance Profile   « line view »
For v11.pl
  Run on Sun Jan 5 19:10:15 2020
Reported on Sun Jan 5 19:10:28 2020

Filename/usr/share/perl/5.26/strict.pm
StatementsExecuted 123 statements in 742µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
91166µs66µsstrict::::bitsstrict::bits
11165µs74µsstrict::::BEGIN@7strict::BEGIN@7
99464µs130µsstrict::::unimportstrict::unimport
55523µs23µsstrict::::importstrict::import
1119µs9µ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
311µs$strict::VERSION = "1.11";
4
51300nsmy ( %bitmask, %explicit_bitmask );
6
7
# spent 74µs (65+9) within strict::BEGIN@7 which was called: # once (65µs+9µs) by main::BEGIN@29 at line 38
BEGIN {
8 # Verify that we're called correctly so that strictures will work.
9 # Can't use Carp, since Carp uses us!
10 # see also warnings.pm.
11121µs19µs die sprintf "Incorrect use of pragma '%s' at %s line %d.\n", __PACKAGE__, +(caller)[1,2]
# spent 9µs making 1 call to strict::CORE:match
12 if __FILE__ !~ ( '(?x) \b '.__PACKAGE__.' \.pmc? \z' )
13 && __FILE__ =~ ( '(?x) \b (?i:'.__PACKAGE__.') \.pmc? \z' );
14
1513µs %bitmask = (
16 refs => 0x00000002,
17 subs => 0x00000200,
18 vars => 0x00000400,
19 );
20
2112µs %explicit_bitmask = (
22 refs => 0x00000020,
23 subs => 0x00000040,
24 vars => 0x00000080,
25 );
26
271700ns my $bits = 0;
2815µs $bits |= $_ for values %bitmask;
29
301300ns my $inline_all_bits = $bits;
31115µs *all_bits = sub () { $inline_all_bits };
32
331400ns $bits = 0;
3413µs $bits |= $_ for values %explicit_bitmask;
35
361300ns my $inline_all_explicit_bits = $bits;
37117µs *all_explicit_bits = sub () { $inline_all_explicit_bits };
381474µs174µs}
# spent 74µs making 1 call to strict::BEGIN@7
39
40
# spent 66µs within strict::bits which was called 9 times, avg 7µs/call: # 9 times (66µs+0s) by strict::unimport at line 69, avg 7µs/call
sub bits {
4195µs my $bits = 0;
4293µs my @wrong;
4398µs foreach my $s (@_) {
44912µs if (exists $bitmask{$s}) {
45915µs $^H |= $explicit_bitmask{$s};
46
4795µs $bits |= $bitmask{$s};
48 }
49 else {
50 push @wrong, $s;
51 }
52 }
5395µs if (@wrong) {
54 require Carp;
55 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
56 }
57942µs $bits;
58}
59
60
# spent 23µs within strict::import which was called 5 times, avg 5µs/call: # once (8µs+0s) by main::BEGIN@29 at line 29 of /homes/dcw/public_html/PSD/article13/v11.pl # once (4µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (4µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (4µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (3µs+0s) by constant::BEGIN@3 at line 3 of constant.pm
sub import {
6152µs shift;
62542µs $^H |= @_ ? &bits : all_bits | all_explicit_bits;
63}
64
65
# spent 130µs (64+66) within strict::unimport which was called 9 times, avg 14µs/call: # once (11µs+10µs) by Carp::BEGIN@132 at line 132 of Carp.pm # once (10µs+9µs) by Carp::BEGIN@592 at line 592 of Carp.pm # once (8µs+8µs) by Function::Parameters::BEGIN@80 at line 80 of Function/Parameters.pm # once (7µs+9µs) by List::Util::BEGIN@31 at line 31 of List/Util.pm # once (6µs+7µs) by Carp::BEGIN@612 at line 612 of Carp.pm # once (6µs+6µs) by constant::BEGIN@40 at line 40 of constant.pm # once (5µs+6µs) by constant::BEGIN@65 at line 65 of constant.pm # once (5µs+5µs) by constant::BEGIN@90 at line 90 of constant.pm # once (5µs+5µs) by constant::BEGIN@141 at line 141 of constant.pm
sub unimport {
6692µs shift;
67
68934µs if (@_) {
69918µs966µs $^H &= ~&bits;
# spent 66µs making 9 calls to strict::bits, avg 7µs/call
70 }
71 else {
72 $^H &= ~all_bits;
73 $^H |= all_explicit_bits;
74 }
75}
76
7718µs1;
78__END__
 
# spent 9µs within strict::CORE:match which was called: # once (9µs+0s) by strict::BEGIN@7 at line 11
sub strict::CORE:match; # opcode