Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/darwin-2level/List/Util.pm |
Statements | Executed 53 statements in 622µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1028 | 5 | 3 | 11.1ms | 38.6ms | first (xsub) | List::Util::
142 | 1 | 1 | 480µs | 480µs | reduce (xsub) | List::Util::
10 | 10 | 10 | 92µs | 92µs | import | List::Util::
1 | 1 | 1 | 11µs | 23µs | BEGIN@9 | List::Util::
1 | 1 | 1 | 6µs | 16µs | BEGIN@30 | List::Util::
0 | 0 | 0 | 0s | 0s | key | List::Util::_Pair::
0 | 0 | 0 | 0s | 0s | value | List::Util::_Pair::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Copyright (c) 1997-2009 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
2 | # This program is free software; you can redistribute it and/or | ||||
3 | # modify it under the same terms as Perl itself. | ||||
4 | # | ||||
5 | # Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk> | ||||
6 | |||||
7 | package List::Util; | ||||
8 | |||||
9 | 2 | 86µs | 2 | 35µs | # spent 23µs (11+12) within List::Util::BEGIN@9 which was called:
# once (11µs+12µs) by Perl::Critic::Command::BEGIN@18 at line 9 # spent 23µs making 1 call to List::Util::BEGIN@9
# spent 12µs making 1 call to strict::import |
10 | 1 | 300ns | require Exporter; | ||
11 | |||||
12 | 1 | 5µs | our @ISA = qw(Exporter); | ||
13 | 1 | 3µs | our @EXPORT_OK = qw( | ||
14 | all any first min max minstr maxstr none notall product reduce sum sum0 shuffle | ||||
15 | pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst | ||||
16 | ); | ||||
17 | 1 | 200ns | our $VERSION = "1.42"; | ||
18 | 1 | 100ns | our $XS_VERSION = $VERSION; | ||
19 | 1 | 12µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
20 | |||||
21 | 1 | 200ns | require XSLoader; | ||
22 | 1 | 295µs | 1 | 288µs | XSLoader::load('List::Util', $XS_VERSION); # spent 288µs making 1 call to XSLoader::load |
23 | |||||
24 | sub import | ||||
25 | # spent 92µs within List::Util::import which was called 10 times, avg 9µs/call:
# once (13µs+0s) by Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop::BEGIN@15 at line 15 of Perl/Critic/Policy/InputOutput/ProhibitReadlineInForLoop.pm
# once (12µs+0s) by Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings::BEGIN@15 at line 15 of Perl/Critic/Policy/TestingAndDebugging/RequireUseWarnings.pm
# once (11µs+0s) by Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes::BEGIN@16 at line 16 of Perl/Critic/Policy/RegularExpressions/ProhibitComplexRegexes.pm
# once (10µs+0s) by Perl::Critic::Policy::Documentation::RequirePodAtEnd::BEGIN@15 at line 15 of Perl/Critic/Policy/Documentation/RequirePodAtEnd.pm
# once (9µs+0s) by Perl::Critic::Document::BEGIN@16 at line 16 of Perl/Critic/Document.pm
# once (8µs+0s) by Perl::Critic::Policy::Subroutines::ProhibitManyArgs::BEGIN@16 at line 16 of Perl/Critic/Policy/Subroutines/ProhibitManyArgs.pm
# once (8µs+0s) by Perl::Critic::Policy::Subroutines::RequireArgUnpacking::BEGIN@19 at line 19 of Perl/Critic/Policy/Subroutines/RequireArgUnpacking.pm
# once (7µs+0s) by PPIx::Regexp::Token::Reference::BEGIN@43 at line 43 of PPIx/Regexp/Token/Reference.pm
# once (7µs+0s) by Perl::Critic::Command::BEGIN@18 at line 18 of Perl/Critic/Command.pm
# once (7µs+0s) by PPIx::Regexp::Node::BEGIN@39 at line 39 of PPIx/Regexp/Node.pm | ||||
26 | 10 | 7µs | my $pkg = caller; | ||
27 | |||||
28 | # (RT88848) Touch the caller's $a and $b, to avoid the warning of | ||||
29 | # Name "main::a" used only once: possible typo" warning | ||||
30 | 2 | 87µs | 2 | 25µs | # spent 16µs (6+9) within List::Util::BEGIN@30 which was called:
# once (6µs+9µs) by Perl::Critic::Command::BEGIN@18 at line 30 # spent 16µs making 1 call to List::Util::BEGIN@30
# spent 9µs making 1 call to strict::unimport |
31 | 10 | 36µs | ${"${pkg}::a"} = ${"${pkg}::a"}; | ||
32 | 10 | 22µs | ${"${pkg}::b"} = ${"${pkg}::b"}; | ||
33 | |||||
34 | 10 | 61µs | 10 | 242µs | goto &Exporter::import; # spent 242µs making 10 calls to Exporter::import, avg 24µs/call |
35 | } | ||||
36 | |||||
37 | # For objects returned by pairs() | ||||
38 | sub List::Util::_Pair::key { shift->[0] } | ||||
39 | sub List::Util::_Pair::value { shift->[1] } | ||||
40 | |||||
41 | 1 | 6µs | 1; | ||
42 | |||||
43 | __END__ | ||||
# spent 38.6ms (11.1+27.5) within List::Util::first which was called 1028 times, avg 38µs/call:
# 1016 times (11.0ms+27.4ms) by PPI::Statement::Sub::prototype at line 100 of PPI/Statement/Sub.pm, avg 38µs/call
# 9 times (36µs+68µs) by Data::OptList::__is_a at line 27 of Data/OptList.pm, avg 12µs/call
# once (26µs+0s) by Perl::Critic::Command::_get_options at line 92 of Perl/Critic/Command.pm
# once (8µs+15µs) by Perl::Critic::Command::_get_input at line 211 of Perl/Critic/Command.pm
# once (5µs+0s) by Perl::Critic::Command::_get_options at line 93 of Perl/Critic/Command.pm | |||||
# spent 480µs within List::Util::reduce which was called 142 times, avg 3µs/call:
# 142 times (480µs+0s) by Perl::Critic::Document::highest_explicit_perl_version at line 376 of Perl/Critic/Document.pm, avg 3µs/call |