Filename | /Users/ether/.perlbrew/libs/36.0@std/lib/perl5/darwin-2level/List/MoreUtils/XS.pm |
Statements | Executed 19 statements in 1.86ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
14 | 1 | 1 | 598µs | 1.53ms | firstres (xsub) | List::MoreUtils::XS::
1 | 1 | 1 | 33µs | 33µs | BEGIN@3 | List::MoreUtils::XS::
1 | 1 | 1 | 9µs | 79µs | BEGIN@6 | List::MoreUtils::XS::
1 | 1 | 1 | 7µs | 9µs | BEGIN@4 | List::MoreUtils::XS::
1 | 1 | 1 | 7µs | 47µs | BEGIN@5 | List::MoreUtils::XS::
1 | 1 | 1 | 7µs | 64µs | BEGIN@8 | List::MoreUtils::XS::
1 | 1 | 1 | 3µs | 3µs | BEGIN@39 | List::MoreUtils::XS::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package List::MoreUtils::XS; | ||||
2 | |||||
3 | 2 | 46µs | 1 | 33µs | # spent 33µs within List::MoreUtils::XS::BEGIN@3 which was called:
# once (33µs+0s) by List::MoreUtils::BEGIN@11 at line 3 # spent 33µs making 1 call to List::MoreUtils::XS::BEGIN@3 |
4 | 2 | 23µs | 2 | 11µs | # spent 9µs (7+2) within List::MoreUtils::XS::BEGIN@4 which was called:
# once (7µs+2µs) by List::MoreUtils::BEGIN@11 at line 4 # spent 9µs making 1 call to List::MoreUtils::XS::BEGIN@4
# spent 2µs making 1 call to strict::import |
5 | 2 | 23µs | 2 | 87µs | # spent 47µs (7+40) within List::MoreUtils::XS::BEGIN@5 which was called:
# once (7µs+40µs) by List::MoreUtils::BEGIN@11 at line 5 # spent 47µs making 1 call to List::MoreUtils::XS::BEGIN@5
# spent 40µs making 1 call to warnings::import |
6 | 2 | 28µs | 2 | 149µs | # spent 79µs (9+70) within List::MoreUtils::XS::BEGIN@6 which was called:
# once (9µs+70µs) by List::MoreUtils::BEGIN@11 at line 6 # spent 79µs making 1 call to List::MoreUtils::XS::BEGIN@6
# spent 70µs making 1 call to base::import |
7 | |||||
8 | 2 | 100µs | 2 | 121µs | # spent 64µs (7+57) within List::MoreUtils::XS::BEGIN@8 which was called:
# once (7µs+57µs) by List::MoreUtils::BEGIN@11 at line 8 # spent 64µs making 1 call to List::MoreUtils::XS::BEGIN@8
# spent 57µs making 1 call to vars::import |
9 | |||||
10 | 1 | 1µs | $VERSION = '0.430'; | ||
11 | |||||
12 | 1 | 0s | @EXPORT = (); | ||
13 | 1 | 4µs | @EXPORT_OK = qw(any all none notall one | ||
14 | any_u all_u none_u notall_u one_u | ||||
15 | reduce_u reduce_0 reduce_1 | ||||
16 | true false | ||||
17 | insert_after insert_after_string | ||||
18 | apply indexes slide | ||||
19 | after after_incl before before_incl | ||||
20 | firstidx lastidx onlyidx | ||||
21 | firstval lastval onlyval | ||||
22 | firstres lastres onlyres | ||||
23 | singleton duplicates frequency occurrences mode | ||||
24 | each_array each_arrayref | ||||
25 | pairwise natatime slideatatime | ||||
26 | arrayify mesh zip6 uniq listcmp | ||||
27 | samples minmax minmaxstr part | ||||
28 | bsearch bsearchidx binsert bremove lower_bound upper_bound equal_range | ||||
29 | qsort); | ||||
30 | 1 | 2µs | %EXPORT_TAGS = (all => \@EXPORT_OK); | ||
31 | |||||
32 | # Load the XS at compile-time so that redefinition warnings will be | ||||
33 | # thrown correctly if the XS versions of part or indexes loaded | ||||
34 | |||||
35 | # PERL_DL_NONLAZY must be false, or any errors in loading will just | ||||
36 | # cause the perl code to be tested | ||||
37 | 1 | 1µs | local $ENV{PERL_DL_NONLAZY} = 0 if $ENV{PERL_DL_NONLAZY}; | ||
38 | |||||
39 | 2 | 188µs | 1 | 3µs | # spent 3µs within List::MoreUtils::XS::BEGIN@39 which was called:
# once (3µs+0s) by List::MoreUtils::BEGIN@11 at line 39 # spent 3µs making 1 call to List::MoreUtils::XS::BEGIN@39 |
40 | 1 | 1.43ms | 1 | 1.42ms | XSLoader::load("List::MoreUtils::XS", "$VERSION"); # spent 1.42ms making 1 call to XSLoader::load |
41 | |||||
42 | =pod | ||||
43 | |||||
44 | =head1 NAME | ||||
45 | |||||
46 | List::MoreUtils::XS - Provide compiled List::MoreUtils functions | ||||
47 | |||||
48 | =head1 SYNOPSIS | ||||
49 | |||||
50 | use List::MoreUtils::XS (); # doesn't export anything | ||||
51 | use List::MoreUtils ':all'; # required to import functions | ||||
52 | |||||
53 | my @procs = get_process_stats->fetchall_array; | ||||
54 | # sort by ppid, then pid | ||||
55 | qsort { $a->[3] <=> $b->[3] or $a->[2] <=> $b->[2] } @procs; | ||||
56 | while( @procs ) { | ||||
57 | my $proc = shift @procs; | ||||
58 | my @children = equal_range { $_->[3] <=> $proc->[2] } @procs; | ||||
59 | } | ||||
60 | |||||
61 | my @left = qw(this is a test); | ||||
62 | my @right = qw(this is also a test); | ||||
63 | my %rlinfo = listcmp @left, @right; | ||||
64 | |||||
65 | # on unsorted | ||||
66 | my $i = firstidx { $_ eq 'yeah' } @foo; | ||||
67 | # on sorted - always first, but might not be 'yeah' | ||||
68 | my $j = lower_bound { $_ cmp 'yeah' } @bar; | ||||
69 | # on sorted - any of occurrences, is surely 'yeah' | ||||
70 | my $k = bsearchidx { $_ cmp 'yeah' } @bar; | ||||
71 | |||||
72 | =head1 DESCRIPTION | ||||
73 | |||||
74 | List::MoreUtils::XS is a backend for List::MoreUtils. Even if it's possible | ||||
75 | (because of user wishes) to have it practically independent from | ||||
76 | L<List::MoreUtils>, it technically depend on C<List::MoreUtils>. Since it's | ||||
77 | only a backend, the API is not public and can change without any warning. | ||||
78 | |||||
79 | =head1 SEE ALSO | ||||
80 | |||||
81 | L<List::Util>, L<List::AllUtils> | ||||
82 | |||||
83 | =head1 AUTHOR | ||||
84 | |||||
85 | Jens Rehsack E<lt>rehsack AT cpan.orgE<gt> | ||||
86 | |||||
87 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||||
88 | |||||
89 | Tassilo von Parseval E<lt>tassilo.von.parseval@rwth-aachen.deE<gt> | ||||
90 | |||||
91 | =head1 COPYRIGHT AND LICENSE | ||||
92 | |||||
93 | Some parts copyright 2011 Aaron Crane. | ||||
94 | |||||
95 | Copyright 2004 - 2010 by Tassilo von Parseval | ||||
96 | |||||
97 | Copyright 2013 - 2017 by Jens Rehsack | ||||
98 | |||||
99 | All code added with 0.417 or later is licensed under the Apache License, | ||||
100 | Version 2.0 (the "License"); you may not use this file except in compliance | ||||
101 | with the License. You may obtain a copy of the License at | ||||
102 | |||||
103 | http://www.apache.org/licenses/LICENSE-2.0 | ||||
104 | |||||
105 | Unless required by applicable law or agreed to in writing, software | ||||
106 | distributed under the License is distributed on an "AS IS" BASIS, | ||||
107 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
108 | See the License for the specific language governing permissions and | ||||
109 | limitations under the License. | ||||
110 | |||||
111 | All code until 0.416 is licensed under the same terms as Perl itself, | ||||
112 | either Perl version 5.8.4 or, at your option, any later version of | ||||
113 | Perl 5 you may have available. | ||||
114 | |||||
115 | =cut | ||||
116 | |||||
117 | 1 | 16µs | 1; | ||
# spent 1.53ms (598µs+930µs) within List::MoreUtils::XS::firstres which was called 14 times, avg 109µs/call:
# 14 times (598µs+930µs) by File::ShareDir::_search_inc_path at line 466 of File/ShareDir.pm, avg 109µs/call |