← Index
NYTProf Performance Profile   « line view »
For t/optimization.t
  Run on Thu Jan 8 22:47:42 2015
Reported on Thu Jan 8 22:48:05 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/5.16.3/strict.pm
StatementsExecuted 1506 statements in 2.15ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111211.02ms1.02msstrict::::bitsstrict::bits
656563408µs1.07msstrict::::importstrict::import
464624326µs683µsstrict::::unimportstrict::unimport
11120µs20µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
1118µs8µ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
31600ns$strict::VERSION = "1.07";
4
5# Verify that we're called correctly so that strictures will work.
6152µs228µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 20µ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
1212µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
171800nsmy %explicit_bitmask = (
18refs => 0x00000020,
19subs => 0x00000040,
20vars => 0x00000080
21);
22
23
# spent 1.02ms within strict::bits which was called 111 times, avg 9µs/call: # 65 times (660µs+0s) by strict::import at line 44, avg 10µs/call # 46 times (357µs+0s) by strict::unimport at line 49, avg 8µs/call
sub bits {
2411148µs my $bits = 0;
2511126µs my @wrong;
26111140µs foreach my $s (@_) {
27241138µs if (exists $bitmask{$s}) {
28241228µs $^H |= $explicit_bitmask{$s};
29 }
30 else { push @wrong, $s };
31241243µs $bits |= $bitmask{$s} || 0;
32 }
3311141µs if (@wrong) {
34 require Carp;
35 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
36 }
37111460µs $bits;
38}
39
4011µsmy @default_bits = qw(refs subs vars);
41
42
# spent 1.07ms (408µs+660µs) within strict::import which was called 65 times, avg 16µs/call: # once (8µs+45µs) by Data::DPath::Path::BEGIN@4 at line 4 of lib/Data/DPath/Path.pm # once (14µs+23µs) by Test::Deep::BEGIN@1.3 at line 1 of Test/Deep/RegexpVersion.pm # once (10µs+14µs) by Opcode::BEGIN@5 at line 5 of Opcode.pm # once (8µs+15µs) by main::BEGIN@3 at line 3 of t/optimization.t # once (8µs+14µs) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (8µs+13µs) by Test::Deep::HashKeys::BEGIN@1 at line 1 of Test/Deep/HashKeysOnly.pm # once (8µs+12µs) by Data::DPath::BEGIN@5 at line 5 of lib/Data/DPath.pm # once (5µs+14µs) by Test::Builder::BEGIN@4 at line 4 of Test/Builder.pm # once (8µs+10µs) by Test::Deep::BEGIN@1 at line 1 of Test/Deep/Cache.pm # once (7µs+11µs) by Test::Deep::BEGIN@1.10 at line 1 of Test/Deep/Set.pm # once (8µs+10µs) by aliased::BEGIN@10 at line 10 of aliased.pm # once (7µs+10µs) by Test::More::BEGIN@4 at line 4 of Test/More.pm # once (7µs+9µs) by Text::Balanced::BEGIN@7 at line 7 of Text/Balanced.pm # once (6µs+10µs) by Test::Deep::BEGIN@1.20 at line 1 of Test/Deep/Blessed.pm # once (7µs+9µs) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (6µs+10µs) by main::BEGIN@1 at line 1 of Test/Deep.pm # once (5µs+11µs) by SelfLoader::BEGIN@93 at line 93 of SelfLoader.pm # once (6µs+10µs) by Data::DPath::BEGIN@2 at line 2 of Sub/Exporter.pm # once (7µs+9µs) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (7µs+9µs) by Test::Deep::Cache::BEGIN@1 at line 1 of Test/Deep/Cache/Simple.pm # once (6µs+10µs) by Test::Deep::BEGIN@1.1 at line 1 of Test/Deep/Stack.pm # once (6µs+9µs) by Data::DPath::Filters::BEGIN@4 at line 4 of lib/Data/DPath/Filters.pm # once (6µs+10µs) by constant::BEGIN@3 at line 3 of constant.pm # once (6µs+9µs) by Data::DPath::Point::BEGIN@4 at line 4 of lib/Data/DPath/Point.pm # once (6µs+9µs) by Data::DPath::Step::BEGIN@4 at line 4 of lib/Data/DPath/Step.pm # once (6µs+9µs) by Iterator::Util::BEGIN@15 at line 15 of Iterator.pm # once (6µs+9µs) by Test::Deep::BEGIN@1.12 at line 1 of Test/Deep/Hash.pm # once (6µs+9µs) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (6µs+9µs) by Data::DPath::Context::BEGIN@15 at line 15 of Iterator/Util.pm # once (5µs+10µs) by Class::XSAccessor::Heavy::BEGIN@5 at line 5 of Class/XSAccessor/Heavy.pm # once (6µs+9µs) by Test::Builder::Module::BEGIN@3 at line 3 of Test/Builder/Module.pm # once (6µs+9µs) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (6µs+9µs) by Safe::BEGIN@28 at line 28 of Safe.pm # once (5µs+9µs) by Sub::Install::BEGIN@4 at line 4 of Sub/Install.pm # once (6µs+9µs) by B::BEGIN@9 at line 9 of B.pm # once (6µs+9µs) by Class::XSAccessor::Array::BEGIN@3 at line 3 of Class/XSAccessor/Array.pm # once (6µs+9µs) by Test::Deep::Stack::BEGIN@1 at line 1 of Test/Deep/MM.pm # once (6µs+9µs) by utf8::BEGIN@2 at line 2 of utf8_heavy.pl # once (6µs+9µs) by POSIX::BEGIN@2 at line 2 of POSIX.pm # once (6µs+9µs) by Sub::Exporter::BEGIN@1 at line 1 of Data/OptList.pm # once (6µs+9µs) by Test::Deep::Hash::BEGIN@1.22 at line 1 of Test/Deep/HashElements.pm # once (6µs+9µs) by Test::Deep::Set::BEGIN@1 at line 1 of Test/Deep/Cmp.pm # once (6µs+9µs) by Data::DPath::Context::BEGIN@4 at line 4 of lib/Data/DPath/Context.pm # once (5µs+9µs) by Devel::StackTrace::BEGIN@8 at line 8 of Devel/StackTrace.pm # once (6µs+9µs) by Data::DPath::Attrs::BEGIN@4 at line 4 of lib/Data/DPath/Attrs.pm # once (6µs+8µs) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (5µs+9µs) by Class::XSAccessor::BEGIN@3 at line 3 of Class/XSAccessor.pm # once (5µs+9µs) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm # once (6µs+8µs) by Config::BEGIN@9 at line 9 of Config.pm # once (6µs+9µs) by Test::Deep::Hash::BEGIN@1.14 at line 1 of Test/Deep/HashKeys.pm # once (5µs+9µs) by Exception::Class::BEGIN@8 at line 8 of Exception/Class.pm # once (6µs+9µs) by Test::Deep::Hash::BEGIN@1 at line 1 of Test/Deep/Ref.pm # once (6µs+8µs) by Exception::Class::Base::BEGIN@6 at line 6 of Exception/Class/Base.pm # once (5µs+9µs) by SelfLoader::BEGIN@3 at line 3 of SelfLoader.pm # once (6µs+8µs) by Devel::StackTrace::Frame::BEGIN@6 at line 6 of Devel/StackTrace/Frame.pm # once (5µs+8µs) by Test::Deep::BEGIN@1.16 at line 1 of Test/Deep/RefType.pm # once (5µs+9µs) by IO::BEGIN@7 at line 7 of IO.pm # once (5µs+8µs) by Test::Deep::BEGIN@1.18 at line 1 of Test/Deep/Shallow.pm # once (5µs+8µs) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm # once (6µs+8µs) by Carp::BEGIN@4 at line 4 of Carp.pm # once (6µs+8µs) by Class::Data::Inheritable::BEGIN@3 at line 3 of Class/Data/Inheritable.pm # once (5µs+8µs) by IO::Handle::BEGIN@261 at line 261 of IO/Handle.pm # once (6µs+6µs) by base::BEGIN@3 at line 3 of base.pm # once (5µs+7µs) by vars::BEGIN@8 at line 8 of vars.pm # once (5µs+6µs) by Iterator::Util::BEGIN@373 at line 373 of Iterator/Util.pm
sub import {
436516µs shift;
4465405µs65660µs $^H |= bits(@_ ? @_ : @default_bits);
# spent 660µs making 65 calls to strict::bits, avg 10µs/call
45}
46
47
# spent 683µs (326+357) within strict::unimport which was called 46 times, avg 15µs/call: # once (12µs+16µs) by Carp::BEGIN@398 at line 398 of Carp.pm # once (10µs+12µs) by Carp::BEGIN@67 at line 67 of Carp.pm # once (10µs+11µs) by Safe::BEGIN@36 at line 36 of Safe.pm # once (9µs+11µs) by Test::Builder::BEGIN@1662 at line 1662 of Test/Builder.pm # once (9µs+10µs) by Sub::Install::BEGIN@184 at line 184 of Sub/Install.pm # once (10µs+8µs) by Test::Deep::BEGIN@83 at line 83 of Test/Deep.pm # once (9µs+9µs) by Carp::BEGIN@18 at line 18 of Carp.pm # once (8µs+10µs) by constant::BEGIN@65 at line 65 of constant.pm # once (8µs+9µs) by Safe::BEGIN@188 at line 188 of Safe.pm # once (8µs+8µs) by B::BEGIN@254 at line 254 of B.pm # once (7µs+10µs) by SelfLoader::BEGIN@73 at line 73 of SelfLoader.pm # once (7µs+9µs) by POSIX::BEGIN@204 at line 204 of POSIX.pm # once (8µs+7µs) by Config::BEGIN@45 at line 45 of Config.pm # once (6µs+8µs) by SelfLoader::BEGIN@158 at line 158 of SelfLoader.pm # once (7µs+8µs) by Test::Builder::BEGIN@2243 at line 2243 of Test/Builder.pm # once (6µs+9µs) by Exception::Class::BEGIN@176 at line 176 of Exception/Class.pm # once (7µs+7µs) by IO::Handle::BEGIN@628 at line 628 of IO/Handle.pm # once (7µs+8µs) by utf8::BEGIN@654 at line 654 of utf8_heavy.pl # once (7µs+7µs) by aliased::BEGIN@45 at line 45 of aliased.pm # once (7µs+8µs) by Iterator::Util::BEGIN@284 at line 284 of Iterator/Util.pm # once (7µs+7µs) by SelfLoader::BEGIN@91 at line 91 of SelfLoader.pm # once (7µs+7µs) by constant::BEGIN@29 at line 29 of constant.pm # once (7µs+7µs) by Safe::BEGIN@334 at line 334 of Safe.pm # once (7µs+6µs) by List::Util::BEGIN@30 at line 30 of List/Util.pm # once (7µs+6µs) by Test::Deep::MM::BEGIN@16 at line 16 of Test/Deep/MM.pm # once (7µs+7µs) by Data::DPath::Context::BEGIN@414 at line 414 of lib/Data/DPath/Context.pm # once (7µs+7µs) by File::Spec::Unix::BEGIN@149 at line 149 of File/Spec/Unix.pm # once (7µs+7µs) by Iterator::Util::BEGIN@370 at line 370 of Iterator/Util.pm # once (7µs+7µs) by Test::Deep::Cmp::BEGIN@21 at line 21 of Test/Deep/Cmp.pm # once (6µs+7µs) by Data::DPath::Context::BEGIN@148 at line 148 of lib/Data/DPath/Context.pm # once (6µs+7µs) by Safe::BEGIN@282 at line 282 of Safe.pm # once (6µs+7µs) by Exception::Class::Base::BEGIN@44 at line 44 of Exception/Class/Base.pm # once (6µs+7µs) by Exception::Class::BEGIN@168 at line 168 of Exception/Class.pm # once (6µs+7µs) by Data::DPath::Context::BEGIN@212 at line 212 of lib/Data/DPath/Context.pm # once (6µs+7µs) by Exception::Class::BEGIN@46 at line 46 of Exception/Class.pm # once (6µs+7µs) by utf8::BEGIN@153 at line 153 of utf8_heavy.pl # once (6µs+6µs) by constant::BEGIN@127 at line 127 of constant.pm # once (6µs+7µs) by Exception::Class::Base::BEGIN@64 at line 64 of Exception/Class/Base.pm # once (6µs+6µs) by Class::XSAccessor::Heavy::BEGIN@27 at line 27 of Class/XSAccessor/Heavy.pm # once (6µs+6µs) by Exception::Class::BEGIN@79 at line 79 of Exception/Class.pm # once (6µs+6µs) by Test::Deep::MM::BEGIN@31 at line 31 of Test/Deep/MM.pm # once (6µs+6µs) by Carp::BEGIN@413 at line 413 of Carp.pm # once (6µs+6µs) by Safe::BEGIN@341 at line 341 of Safe.pm # once (6µs+6µs) by Carp::BEGIN@8 at line 8 of Carp.pm # once (6µs+6µs) by Devel::StackTrace::Frame::BEGIN@11 at line 11 of Devel/StackTrace/Frame.pm # once (5µs+6µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm
sub unimport {
484613µs shift;
4946319µs46357µs $^H &= ~ bits(@_ ? @_ : @default_bits);
# spent 357µs making 46 calls to strict::bits, avg 8µs/call
50}
51
52111µs1;
53__END__
 
# spent 8µs within strict::CORE:match which was called: # once (8µs+0s) by main::BEGIN@3 at line 6
sub strict::CORE:match; # opcode
# spent 20µs within strict::CORE:regcomp which was called: # once (20µs+0s) by main::BEGIN@3 at line 6
sub strict::CORE:regcomp; # opcode