Filename | /home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/x86_64-linux/List/Util.pm |
Statements | Executed 21 statements in 348µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
7 | 1 | 1 | 32µs | 75µs | first (xsub) | List::Util::
2 | 2 | 2 | 15µs | 15µs | import | List::Util::
1 | 1 | 1 | 11µs | 21µs | BEGIN@9 | List::Util::
1 | 1 | 1 | 7µs | 15µs | BEGIN@30 | List::Util::
1 | 1 | 1 | 2µs | 2µs | max (xsub) | List::Util::
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 | 75µs | 2 | 31µs | # spent 21µs (11+10) within List::Util::BEGIN@9 which was called:
# once (11µs+10µs) by Benchmark::Perl::Formance::BEGIN@16 at line 9 # spent 21µs making 1 call to List::Util::BEGIN@9
# spent 10µs making 1 call to strict::import |
10 | 1 | 600ns | require Exporter; | ||
11 | |||||
12 | 1 | 5µs | our @ISA = qw(Exporter); | ||
13 | 1 | 2µs | our @EXPORT_OK = qw( | ||
14 | all any first min max minstr maxstr none notall product reduce sum sum0 shuffle | ||||
15 | pairmap pairgrep pairfirst pairs pairkeys pairvalues | ||||
16 | ); | ||||
17 | 1 | 200ns | our $VERSION = "1.38"; | ||
18 | 1 | 200ns | our $XS_VERSION = $VERSION; | ||
19 | 1 | 10µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
20 | |||||
21 | 1 | 200ns | require XSLoader; | ||
22 | 1 | 176µs | 1 | 168µs | XSLoader::load('List::Util', $XS_VERSION); # spent 168µs making 1 call to XSLoader::load |
23 | |||||
24 | sub import | ||||
25 | # spent 15µs within List::Util::import which was called 2 times, avg 8µs/call:
# once (8µs+0s) by Data::DPath::Context::BEGIN@20 at line 20 of Data/DPath/Context.pm
# once (7µs+0s) by Benchmark::Perl::Formance::BEGIN@16 at line 16 of lib/Benchmark/Perl/Formance.pm | ||||
26 | 2 | 1µ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 | 52µs | 2 | 24µs | # spent 15µs (7+9) within List::Util::BEGIN@30 which was called:
# once (7µs+9µs) by Benchmark::Perl::Formance::BEGIN@16 at line 30 # spent 15µs making 1 call to List::Util::BEGIN@30
# spent 9µs making 1 call to strict::unimport |
31 | 2 | 6µs | ${"${pkg}::a"} = ${"${pkg}::a"}; | ||
32 | 2 | 3µs | ${"${pkg}::b"} = ${"${pkg}::b"}; | ||
33 | |||||
34 | 2 | 12µs | 2 | 72µs | goto &Exporter::import; # spent 72µs making 2 calls to Exporter::import, avg 36µs/call |
35 | } | ||||
36 | |||||
37 | 1 | 5µs | 1; | ||
38 | |||||
39 | __END__ | ||||
# spent 75µs (32+43) within List::Util::first which was called 7 times, avg 11µs/call:
# 7 times (32µs+43µs) by Data::OptList::__is_a at line 27 of Data/OptList.pm, avg 11µs/call | |||||
# spent 2µs within List::Util::max which was called:
# once (2µs+0s) by Benchmark::Perl::Formance::print_outstyle_summary at line 720 of lib/Benchmark/Perl/Formance.pm |