← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:40 2014

Filename/opt/perl-5.18.1/lib/5.18.1/strict.pm
StatementsExecuted 2657 statements in 3.08ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
187321.73ms1.73msstrict::::bitsstrict::bits
131118114773µs2.10msstrict::::importstrict::import
555530373µs772µsstrict::::unimportstrict::unimport
11122µs22µ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
31800ns$strict::VERSION = "1.07";
4
5# Verify that we're called correctly so that strictures will work.
6157µs227µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 22µ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
1212µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
171800nsmy %explicit_bitmask = (
18refs => 0x00000020,
19subs => 0x00000040,
20vars => 0x00000080
21);
22
23
# spent 1.73ms within strict::bits which was called 187 times, avg 9µs/call: # 131 times (1.32ms+0s) by strict::import at line 44, avg 10µs/call # 55 times (399µs+0s) by strict::unimport at line 49, avg 7µs/call # once (10µs+0s) by Mouse::Exporter::BEGIN@10 at line 11 of Mouse/Exporter.pm
sub bits {
2418759µs my $bits = 0;
2518720µs my @wrong;
26187190µs foreach my $s (@_) {
27448152µs if (exists $bitmask{$s}) {
28448318µs $^H |= $explicit_bitmask{$s};
29 }
30 else { push @wrong, $s };
31448320µs $bits |= $bitmask{$s} || 0;
32 }
3318754µs if (@wrong) {
34 require Carp;
35 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
36 }
37187785µs $bits;
38}
39
4011µsmy @default_bits = qw(refs subs vars);
41
42
# spent 2.10ms (773µs+1.32) within strict::import which was called 131 times, avg 16µs/call: # 12 times (55µs+115µs) by strictures::import at line 30 of strictures.pm, avg 14µs/call # 2 times (11µs+19µs) by Moose::Exporter::import at line 782 of Moose/Exporter.pm, avg 15µs/call # 2 times (10µs+20µs) by Moose::Exporter::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Exporter.pm:519] at line 464 of Moose/Exporter.pm, avg 15µs/call # once (6µs+18µs) by Moose::Meta::Method::Augmented::BEGIN@9 at line 9 of Moose/Meta/Method/Augmented.pm # once (8µs+16µs) by main::BEGIN@3 at line 3 of fastest.pl # once (8µs+13µs) by Mouse::Exporter::BEGIN@2 at line 2 of Mouse/Exporter.pm # once (10µs+10µs) by Class::MOP::Instance::BEGIN@10 at line 10 of Class/MOP/Instance.pm # once (10µs+10µs) by re::BEGIN@4 at line 4 of re.pm # once (6µs+14µs) by Class::MOP::Mixin::BEGIN@9 at line 9 of Class/MOP/Mixin.pm # once (7µs+13µs) by Class::MOP::Deprecated::BEGIN@9 at line 9 of Class/MOP/Deprecated.pm # once (9µs+10µs) by Moose::Meta::Role::Application::RoleSummation::BEGIN@9 at line 9 of Moose/Meta/Role/Application/RoleSummation.pm # once (9µs+10µs) by Class::MOP::Package::BEGIN@10 at line 10 of Class/MOP/Package.pm # once (7µs+12µs) by Moose::Util::TypeConstraints::Builtins::BEGIN@9 at line 9 of Moose/Util/TypeConstraints/Builtins.pm # once (6µs+13µs) by Moose::Util::MetaRole::BEGIN@9 at line 9 of Moose/Util/MetaRole.pm # once (6µs+12µs) by Class::MOP::Attribute::BEGIN@10 at line 10 of Class/MOP/Attribute.pm # once (7µs+11µs) by Type::Coercion::BEGIN@4 at line 4 of Type/Coercion.pm # once (7µs+11µs) by mro::BEGIN@10 at line 10 of mro.pm # once (8µs+10µs) by Carp::BEGIN@4 at line 4 of Carp.pm # once (6µs+11µs) by Moose::Meta::Instance::BEGIN@10 at line 10 of Moose/Meta/Instance.pm # once (6µs+11µs) by Moose::Meta::TypeCoercion::BEGIN@10 at line 10 of Moose/Meta/TypeCoercion.pm # once (6µs+11µs) by Moose::BEGIN@8 at line 8 of Moose.pm # once (6µs+11µs) by strictures::BEGIN@3 at line 3 of strictures.pm # once (7µs+10µs) by Benchmark::BEGIN@3 at line 3 of Benchmark.pm # once (6µs+11µs) by Moose::Meta::TypeConstraint::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint.pm # once (6µs+10µs) by Data::OptList::BEGIN@1 at line 1 of Sub/Install.pm # once (6µs+10µs) by List::Util::BEGIN@11 at line 11 of List/Util.pm # once (6µs+10µs) by Sub::Name::BEGIN@44 at line 44 of Sub/Name.pm # once (6µs+10µs) by Typed::BEGIN@3 at line 3 of Typed.pm # once (6µs+10µs) by Class::MOP::Method::Constructor::BEGIN@10 at line 10 of Class/MOP/Method/Constructor.pm # once (6µs+10µs) by Config::BEGIN@9 at line 9 of Config.pm # once (6µs+10µs) by Class::Load::PP::BEGIN@6 at line 6 of Class/Load/PP.pm # once (6µs+10µs) by Scalar::Util::BEGIN@11 at line 11 of Scalar/Util.pm # once (6µs+10µs) by Type::Utils::BEGIN@4 at line 4 of Type/Utils.pm # once (6µs+10µs) by MRO::Compat::BEGIN@2 at line 2 of MRO/Compat.pm # once (6µs+10µs) by Types::TypeTiny::BEGIN@3 at line 3 of Types/TypeTiny.pm # once (6µs+10µs) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (6µs+10µs) by Moose::Exporter::BEGIN@9 at line 9 of Moose/Exporter.pm # once (6µs+10µs) by Class::MOP::Class::BEGIN@10 at line 10 of Class/MOP/Class.pm # once (6µs+10µs) by Class::MOP::Mixin::HasMethods::BEGIN@9 at line 9 of Class/MOP/Mixin/HasMethods.pm # once (6µs+10µs) by Class::MOP::Method::Accessor::BEGIN@10 at line 10 of Class/MOP/Method/Accessor.pm # once (6µs+10µs) by Moose::Error::Util::BEGIN@4 at line 4 of Moose/Error/Util.pm # once (6µs+10µs) by Moose::Meta::Class::BEGIN@10 at line 10 of Moose/Meta/Class.pm # once (6µs+10µs) by Eval::TypeTiny::BEGIN@3 at line 3 of Eval/TypeTiny.pm # once (6µs+10µs) by parent::BEGIN@2 at line 2 of parent.pm # once (6µs+10µs) by Class::Load::BEGIN@5 at line 5 of Class/Load.pm # once (6µs+10µs) by Package::DeprecationManager::BEGIN@6 at line 6 of Package/DeprecationManager.pm # once (6µs+10µs) by Class::MOP::Mixin::HasAttributes::BEGIN@9 at line 9 of Class/MOP/Mixin/HasAttributes.pm # once (6µs+10µs) by Sub::Exporter::Progressive::BEGIN@3 at line 3 of Sub/Exporter/Progressive.pm # once (6µs+10µs) by constant::BEGIN@3 at line 3 of constant.pm # once (6µs+10µs) by Class::MOP::Method::Wrapped::BEGIN@10 at line 10 of Class/MOP/Method/Wrapped.pm # once (6µs+10µs) by Class::MOP::Method::Overload::BEGIN@10 at line 10 of Class/MOP/Method/Overload.pm # once (6µs+10µs) by Moose::Meta::Role::Composite::BEGIN@9 at line 9 of Moose/Meta/Role/Composite.pm # once (6µs+10µs) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm # once (6µs+10µs) by Class::Load::BEGIN@1 at line 1 of Data/OptList.pm # once (6µs+10µs) by Moose::Meta::Role::Application::ToInstance::BEGIN@9 at line 9 of Moose/Meta/Role/Application/ToInstance.pm # once (6µs+10µs) by Exporter::Tiny::BEGIN@4 at line 4 of Exporter/Tiny.pm # once (6µs+10µs) by Class::MOP::Object::BEGIN@10 at line 10 of Class/MOP/Object.pm # once (6µs+10µs) by Moose::Meta::Method::Meta::BEGIN@10 at line 10 of Moose/Meta/Method/Meta.pm # once (6µs+10µs) by Moose::Util::BEGIN@9 at line 9 of Moose/Util.pm # once (6µs+10µs) by Moose::Meta::Method::Overridden::BEGIN@9 at line 9 of Moose/Meta/Method/Overridden.pm # once (6µs+10µs) by Moose::Meta::TypeConstraint::Enum::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Enum.pm # once (6µs+10µs) by Moose::Meta::Role::Attribute::BEGIN@9 at line 9 of Moose/Meta/Role/Attribute.pm # once (6µs+10µs) by Try::Tiny::BEGIN@11 at line 11 of Try/Tiny.pm # once (6µs+10µs) by Moose::Meta::Attribute::BEGIN@10 at line 10 of Moose/Meta/Attribute.pm # once (6µs+10µs) by Devel::GlobalDestruction::BEGIN@3 at line 3 of Devel/GlobalDestruction.pm # once (6µs+10µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/DuckType.pm # once (6µs+10µs) by Class::MOP::Class::Immutable::Trait::BEGIN@9 at line 9 of Class/MOP/Class/Immutable/Trait.pm # once (6µs+10µs) by Class::MOP::Mixin::AttributeCore::BEGIN@9 at line 9 of Class/MOP/Mixin/AttributeCore.pm # once (6µs+10µs) by Moose::Meta::Method::Delegation::BEGIN@10 at line 10 of Moose/Meta/Method/Delegation.pm # once (6µs+10µs) by Moose::Meta::Method::BEGIN@9 at line 9 of Moose/Meta/Method.pm # once (6µs+10µs) by Moose::Deprecated::BEGIN@9 at line 9 of Moose/Deprecated.pm # once (6µs+10µs) by Moose::Error::Default::BEGIN@9 at line 9 of Moose/Error/Default.pm # once (6µs+10µs) by Types::Standard::BEGIN@4 at line 4 of Types/Standard.pm # once (6µs+10µs) by Moose::Meta::Method::Accessor::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor.pm # once (6µs+10µs) by Moose::Object::BEGIN@10 at line 10 of Moose/Object.pm # once (6µs+10µs) by Class::XSAccessor::BEGIN@3 at line 3 of Class/XSAccessor.pm # once (7µs+9µs) by Object::Tiny::BEGIN@3 at line 3 of Object/Tiny.pm # once (6µs+10µs) by Moose::Meta::Method::Destructor::BEGIN@10 at line 10 of Moose/Meta/Method/Destructor.pm # once (6µs+10µs) by Eval::Closure::BEGIN@8 at line 8 of Eval/Closure.pm # once (6µs+10µs) by Package::Stash::XS::BEGIN@8 at line 8 of Package/Stash/XS.pm # once (6µs+10µs) by Moose::Meta::TypeConstraint::Role::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Role.pm # once (6µs+10µs) by Moose::Meta::TypeConstraint::Class::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Class.pm # once (6µs+10µs) by Class::MOP::Module::BEGIN@10 at line 10 of Class/MOP/Module.pm # once (6µs+9µs) by B::BEGIN@9 at line 9 of B.pm # once (6µs+10µs) by Class::XSAccessor::Heavy::BEGIN@5 at line 5 of Class/XSAccessor/Heavy.pm # once (6µs+10µs) by Moose::Meta::Role::Application::ToClass::BEGIN@9 at line 9 of Moose/Meta/Role/Application/ToClass.pm # once (6µs+10µs) by Type::Tiny::BEGIN@4 at line 4 of Type/Tiny.pm # once (6µs+9µs) by Object::Tiny::XS::BEGIN@2 at line 2 of Object/Tiny/XS.pm # once (6µs+10µs) by Moose::Meta::TypeCoercion::Union::BEGIN@10 at line 10 of Moose/Meta/TypeCoercion/Union.pm # once (6µs+10µs) by Class::MOP::MiniTrait::BEGIN@9 at line 9 of Class/MOP/MiniTrait.pm # once (5µs+10µs) by Moose::Meta::TypeConstraint::Union::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/Union.pm # once (6µs+10µs) by Class::MOP::Method::BEGIN@10 at line 10 of Class/MOP/Method.pm # once (6µs+10µs) by Type::Library::BEGIN@4 at line 4 of Type/Library.pm # once (5µs+10µs) by Class::MOP::Method::Generated::BEGIN@10 at line 10 of Class/MOP/Method/Generated.pm # once (5µs+10µs) by Moose::Meta::Mixin::AttributeCore::BEGIN@9 at line 9 of Moose/Meta/Mixin/AttributeCore.pm # once (6µs+10µs) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm # once (6µs+10µs) by Moose::Meta::Role::Method::Required::BEGIN@10 at line 10 of Moose/Meta/Role/Method/Required.pm # once (5µs+10µs) by Module::Implementation::BEGIN@9 at line 9 of Module/Implementation.pm # once (6µs+10µs) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm # once (6µs+10µs) by Moose::Meta::Role::Method::BEGIN@10 at line 10 of Moose/Meta/Role/Method.pm # once (6µs+10µs) by Package::Stash::BEGIN@8 at line 8 of Package/Stash.pm # once (6µs+10µs) by Class::MOP::BEGIN@10 at line 10 of Class/MOP.pm # once (6µs+10µs) by Class::MOP::Method::Inlined::BEGIN@9 at line 9 of Class/MOP/Method/Inlined.pm # once (6µs+10µs) by Moose::Meta::Method::Constructor::BEGIN@10 at line 10 of Moose/Meta/Method/Constructor.pm # once (6µs+10µs) by Moose::Meta::TypeConstraint::Registry::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/Registry.pm # once (6µs+10µs) by Moose::Exporter::BEGIN@2.1 at line 2 of Sub/Exporter.pm # once (6µs+9µs) by Moose::Meta::Role::Application::BEGIN@9 at line 9 of Moose/Meta/Role/Application.pm # once (6µs+10µs) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Parameterized.pm # once (5µs+10µs) by Moose::Meta::Class::Immutable::Trait::BEGIN@9 at line 9 of Moose/Meta/Class/Immutable/Trait.pm # once (5µs+10µs) by Class::MOP::Method::Meta::BEGIN@10 at line 10 of Class/MOP/Method/Meta.pm # once (6µs+10µs) by Moose::Meta::Role::Method::Conflicting::BEGIN@10 at line 10 of Moose/Meta/Role/Method/Conflicting.pm # once (5µs+10µs) by metaclass::BEGIN@10 at line 10 of metaclass.pm # once (5µs+10µs) by Moose::Meta::Role::BEGIN@9 at line 9 of Moose/Meta/Role.pm # once (6µs+9µs) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Parameterizable.pm # once (5µs+9µs) by Moose::Meta::Role::Application::ToRole::BEGIN@9 at line 9 of Moose/Meta/Role/Application/ToRole.pm # once (5µs+9µs) by Sub::Exporter::Progressive::BEGIN@23 at line 23 of Sub/Exporter/Progressive.pm # once (6µs+8µs) by vars::BEGIN@8 at line 8 of vars.pm # once (6µs+7µs) by base::BEGIN@3 at line 3 of base.pm
sub import {
4313118µs shift;
44131719µs1311.32ms $^H |= bits(@_ ? @_ : @default_bits);
# spent 1.32ms making 131 calls to strict::bits, avg 10µs/call
45}
46
47
# spent 772µs (373+399) within strict::unimport which was called 55 times, avg 14µs/call: # once (12µs+6µs) by Carp::BEGIN@8 at line 8 of Carp.pm # once (6µs+11µs) by Mouse::Util::BEGIN@14 at line 14 of Mouse/Util.pm # once (8µs+8µs) by B::BEGIN@251 at line 251 of B.pm # once (8µs+8µs) by Moose::Object::BEGIN@85 at line 85 of Moose/Object.pm # once (8µs+7µs) by Class::MOP::Class::Immutable::Trait::BEGIN@36 at line 36 of Class/MOP/Class/Immutable/Trait.pm # once (6µs+9µs) by Benchmark::BEGIN@426 at line 426 of Benchmark.pm # once (8µs+7µs) by Exporter::Tiny::BEGIN@17 at line 17 of Exporter/Tiny.pm # once (7µs+8µs) by Carp::BEGIN@433 at line 433 of Carp.pm # once (7µs+8µs) by Sub::Quote::BEGIN@108 at line 108 of Sub/Quote.pm # once (7µs+8µs) by Mouse::Exporter::BEGIN@232 at line 232 of Mouse/Exporter.pm # once (8µs+7µs) by parent::BEGIN@25 at line 25 of parent.pm # once (7µs+7µs) by Moose::Exporter::BEGIN@132 at line 132 of Moose/Exporter.pm # once (7µs+7µs) by Module::Implementation::BEGIN@123 at line 123 of Module/Implementation.pm # once (7µs+8µs) by Mouse::Meta::Module::BEGIN@220 at line 220 of Mouse/Meta/Module.pm # once (7µs+7µs) by Config::BEGIN@47 at line 47 of Config.pm # once (7µs+7µs) by Moo::BEGIN@70 at line 70 of Moo.pm # once (7µs+7µs) by Moose::Exporter::BEGIN@716 at line 716 of Moose/Exporter.pm # once (6µs+8µs) by Mouse::Meta::Class::BEGIN@26 at line 26 of Mouse/Meta/Class.pm # once (7µs+8µs) by Moose::Exporter::BEGIN@321 at line 321 of Moose/Exporter.pm # once (7µs+7µs) by Sub::Install::BEGIN@109 at line 109 of Sub/Install.pm # once (7µs+7µs) by Mouse::Exporter::BEGIN@98 at line 98 of Mouse/Exporter.pm # once (6µs+8µs) by Type::Library::BEGIN@38 at line 38 of Type/Library.pm # once (7µs+7µs) by Type::Library::BEGIN@207 at line 207 of Type/Library.pm # once (7µs+7µs) by Moo::_Utils::BEGIN@92 at line 92 of Moo/_Utils.pm # once (7µs+7µs) by constant::BEGIN@28 at line 28 of constant.pm # once (7µs+7µs) by Mouse::Util::BEGIN@96 at line 96 of Mouse/Util.pm # once (7µs+7µs) by Typed::BEGIN@148 at line 148 of Typed.pm # once (7µs+7µs) by Class::XSAccessor::Heavy::BEGIN@27 at line 27 of Class/XSAccessor/Heavy.pm # once (7µs+7µs) by MRO::Compat::BEGIN@227 at line 227 of MRO/Compat.pm # once (7µs+7µs) by Moose::Util::TypeConstraints::BEGIN@68 at line 68 of Moose/Util/TypeConstraints.pm # once (7µs+7µs) by Mouse::Meta::Module::BEGIN@299 at line 299 of Mouse/Meta/Module.pm # once (7µs+7µs) by Exporter::Tiny::BEGIN@60 at line 60 of Exporter/Tiny.pm # once (7µs+7µs) by Typed::BEGIN@33 at line 33 of Typed.pm # once (7µs+7µs) by List::Util::BEGIN@32 at line 32 of List/Util.pm # once (7µs+7µs) by MRO::Compat::BEGIN@258 at line 258 of MRO/Compat.pm # once (7µs+7µs) by Type::Library::BEGIN@280 at line 280 of Type/Library.pm # once (7µs+7µs) by Sub::Exporter::Progressive::BEGIN@18 at line 18 of Sub/Exporter/Progressive.pm # once (7µs+7µs) by Time::HiRes::BEGIN@43 at line 43 of Time/HiRes.pm # once (6µs+7µs) by Typed::BEGIN@78 at line 78 of Typed.pm # once (6µs+7µs) by Exporter::Tiny::BEGIN@160 at line 160 of Exporter/Tiny.pm # once (6µs+7µs) by constant::BEGIN@116 at line 116 of constant.pm # once (6µs+7µs) by Carp::BEGIN@67 at line 67 of Carp.pm # once (6µs+7µs) by Class::MOP::Package::BEGIN@164 at line 164 of Class/MOP/Package.pm # once (6µs+7µs) by Type::Library::BEGIN@231 at line 231 of Type/Library.pm # once (6µs+7µs) by Types::Standard::BEGIN@28 at line 28 of Types/Standard.pm # once (6µs+7µs) by MRO::Compat::BEGIN@118 at line 118 of MRO/Compat.pm # once (6µs+7µs) by Exporter::Tiny::BEGIN@87 at line 87 of Exporter/Tiny.pm # once (6µs+7µs) by Exporter::Tiny::BEGIN@104 at line 104 of Exporter/Tiny.pm # once (6µs+7µs) by constant::BEGIN@54 at line 54 of constant.pm # once (6µs+7µs) by Type::Library::BEGIN@58 at line 58 of Type/Library.pm # once (6µs+6µs) by Moose::Exporter::BEGIN@726 at line 726 of Moose/Exporter.pm # once (6µs+7µs) by Class::MOP::Class::Immutable::Trait::BEGIN@46 at line 46 of Class/MOP/Class/Immutable/Trait.pm # once (6µs+7µs) by Carp::BEGIN@448 at line 448 of Carp.pm # once (6µs+7µs) by Carp::BEGIN@18 at line 18 of Carp.pm # once (5µs+6µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm
sub unimport {
48558µs shift;
4955364µs55399µs $^H &= ~ bits(@_ ? @_ : @default_bits);
# spent 399µs making 55 calls to strict::bits, avg 7µs/call
50}
51
52113µs1;
53__END__
 
# spent 5µs within strict::CORE:match which was called: # once (5µs+0s) by main::BEGIN@3 at line 6
sub strict::CORE:match; # opcode
# spent 22µs within strict::CORE:regcomp which was called: # once (22µs+0s) by main::BEGIN@3 at line 6
sub strict::CORE:regcomp; # opcode