← Index
NYTProf Performance Profile   « block view • line view • sub view »
For ./testnewboardincnply
  Run on Mon Jan 12 21:52:27 2015
Reported on Mon Jan 12 22:01:17 2015

Filename/usr/share/perl/5.14/strict.pm
StatementsExecuted 170 statements in 314µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
153176µs76µsstrict::::bitsstrict::bits
1313773µs133µsstrict::::unimportstrict::unimport
14141440µs44µsstrict::::importstrict::import
11121µs21µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
1115µs5µ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
31900ns$strict::VERSION = "1.04";
4
5# Verify that we're called correctly so that strictures will work.
6141µs226µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 21µs making 1 call to strict::CORE:regcomp # spent 5µ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
1213µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
17
18
# spent 76µs within strict::bits which was called 15 times, avg 5µs/call: # 13 times (60µs+0s) by strict::unimport at line 41, avg 5µs/call # once (13µs+0s) by Carp::BEGIN@3 at line 32 # once (3µs+0s) by strict::import at line 36
sub bits {
1911199µs my $bits = 0;
20 my @wrong;
21 foreach my $s (@_) {
22 push @wrong, $s unless exists $bitmask{$s};
23 $bits |= $bitmask{$s} || 0;
24 }
25 if (@wrong) {
26 require Carp;
27 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
28 }
29 $bits;
30}
31
3213µs113µsmy $default_bits = bits(qw(refs subs vars));
# spent 13µs making 1 call to strict::bits
33
34
# spent 44µs (40+3) within strict::import which was called 14 times, avg 3µs/call: # once (4µs+3µs) by vars::BEGIN@8 at line 8 of vars.pm # once (5µs+0s) by Carp::BEGIN@3 at line 3 of Carp.pm # once (4µs+0s) by Tuple::BEGIN@3 at line 3 of /homes/dcw/lib/perl5/DCW/Tuple.pm # once (3µs+0s) by List::BEGIN@10 at line 10 of /homes/dcw/lib/perl5/DCW/List.pm # once (3µs+0s) by utf8::BEGIN@2 at line 2 of utf8_heavy.pl # once (3µs+0s) by Sorthash::BEGIN@6 at line 6 of /homes/dcw/lib/perl5/DCW/Sorthash.pm # once (2µs+0s) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm # once (2µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (2µs+0s) by parent::BEGIN@2 at line 2 of parent.pm # once (2µs+0s) by Getopt::Long::BEGIN@17 at line 17 of Getopt/Long.pm # once (2µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (2µs+0s) by Config::BEGIN@9 at line 9 of Config.pm # once (2µs+0s) by lib::BEGIN@8 at line 8 of lib.pm # once (2µs+0s) by Clone::BEGIN@4 at line 4 of Clone.pm
sub import {
352872µs shift;
3613µs $^H |= @_ ? bits(@_) : $default_bits;
# spent 3µs making 1 call to strict::bits
37}
38
39
# spent 133µs (73+60) within strict::unimport which was called 13 times, avg 10µs/call: # once (15µs+8µs) by Carp::BEGIN@46 at line 46 of Carp.pm # once (11µs+12µs) by Carp::BEGIN@341 at line 341 of Carp.pm # once (7µs+6µs) by utf8::BEGIN@399 at line 399 of utf8_heavy.pl # once (6µs+5µs) by utf8::BEGIN@123 at line 123 of utf8_heavy.pl # once (4µs+3µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm # once (4µs+4µs) by constant::BEGIN@29 at line 29 of constant.pm # once (4µs+3µs) by parent::BEGIN@25 at line 25 of parent.pm # once (4µs+3µs) by Config::BEGIN@45 at line 45 of Config.pm # once (4µs+3µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm # once (3µs+3µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (4µs+3µs) by constant::BEGIN@114 at line 114 of constant.pm # once (4µs+3µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm # once (4µs+3µs) by constant::BEGIN@52 at line 52 of constant.pm
sub unimport {
402679µs shift;
411360µs $^H &= ~ (@_ ? bits(@_) : $default_bits);
# spent 60µs making 13 calls to strict::bits, avg 5µs/call
42}
43
44116µs1;
45__END__
 
# spent 5µs within strict::CORE:match which was called: # once (5µs+0s) by Carp::BEGIN@3 at line 6
sub strict::CORE:match; # opcode
# spent 21µs within strict::CORE:regcomp which was called: # once (21µs+0s) by Carp::BEGIN@3 at line 6
sub strict::CORE:regcomp; # opcode