← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Thu Dec 15 15:23:56 2022
Reported on Thu Dec 15 15:27:02 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/darwin-2level/List/MoreUtils/XS.pm
StatementsExecuted 19 statements in 5.19ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1411328µs2.78msList::MoreUtils::XS::::firstresList::MoreUtils::XS::firstres (xsub)
11125µs25µsList::MoreUtils::XS::::BEGIN@3List::MoreUtils::XS::BEGIN@3
1117µs10µsList::MoreUtils::XS::::BEGIN@4List::MoreUtils::XS::BEGIN@4
1116µs35µsList::MoreUtils::XS::::BEGIN@5List::MoreUtils::XS::BEGIN@5
1116µs49µsList::MoreUtils::XS::::BEGIN@8List::MoreUtils::XS::BEGIN@8
1114µs60µsList::MoreUtils::XS::::BEGIN@6List::MoreUtils::XS::BEGIN@6
1113µs3µsList::MoreUtils::XS::::BEGIN@39List::MoreUtils::XS::BEGIN@39
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package List::MoreUtils::XS;
2
3241µs125µs
# spent 25µs within List::MoreUtils::XS::BEGIN@3 which was called: # once (25µs+0s) by List::MoreUtils::BEGIN@11 at line 3
use 5.008_001;
# spent 25µs making 1 call to List::MoreUtils::XS::BEGIN@3
4219µs213µs
# spent 10µs (7+3) within List::MoreUtils::XS::BEGIN@4 which was called: # once (7µs+3µs) by List::MoreUtils::BEGIN@11 at line 4
use strict;
# spent 10µs making 1 call to List::MoreUtils::XS::BEGIN@4 # spent 3µs making 1 call to strict::import
5215µs264µs
# spent 35µs (6+29) within List::MoreUtils::XS::BEGIN@5 which was called: # once (6µs+29µs) by List::MoreUtils::BEGIN@11 at line 5
use warnings;
# spent 35µs making 1 call to List::MoreUtils::XS::BEGIN@5 # spent 29µs making 1 call to warnings::import
6219µs2116µs
# spent 60µs (4+56) within List::MoreUtils::XS::BEGIN@6 which was called: # once (4µs+56µs) by List::MoreUtils::BEGIN@11 at line 6
use base ('Exporter');
# spent 60µs making 1 call to List::MoreUtils::XS::BEGIN@6 # spent 56µs making 1 call to base::import
7
8286µs292µs
# spent 49µs (6+43) within List::MoreUtils::XS::BEGIN@8 which was called: # once (6µs+43µs) by List::MoreUtils::BEGIN@11 at line 8
use vars qw{$VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS};
# spent 49µs making 1 call to List::MoreUtils::XS::BEGIN@8 # spent 43µs making 1 call to vars::import
9
1011µs$VERSION = '0.430';
11
1210s@EXPORT = ();
1313µ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);
3011µ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
3711µslocal $ENV{PERL_DL_NONLAZY} = 0 if $ENV{PERL_DL_NONLAZY};
38
39287µs13µ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
use XSLoader ();
# spent 3µs making 1 call to List::MoreUtils::XS::BEGIN@39
4014.90ms14.89msXSLoader::load("List::MoreUtils::XS", "$VERSION");
# spent 4.89ms making 1 call to XSLoader::load
41
42=pod
43
44=head1 NAME
45
46List::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
74List::MoreUtils::XS is a backend for List::MoreUtils. Even if it's possible
75(because of user wishes) to have it practically independent from
76L<List::MoreUtils>, it technically depend on C<List::MoreUtils>. Since it's
77only a backend, the API is not public and can change without any warning.
78
79=head1 SEE ALSO
80
81L<List::Util>, L<List::AllUtils>
82
83=head1 AUTHOR
84
85Jens Rehsack E<lt>rehsack AT cpan.orgE<gt>
86
87Adam Kennedy E<lt>adamk@cpan.orgE<gt>
88
89Tassilo von Parseval E<lt>tassilo.von.parseval@rwth-aachen.deE<gt>
90
91=head1 COPYRIGHT AND LICENSE
92
93Some parts copyright 2011 Aaron Crane.
94
95Copyright 2004 - 2010 by Tassilo von Parseval
96
97Copyright 2013 - 2017 by Jens Rehsack
98
99All code added with 0.417 or later is licensed under the Apache License,
100Version 2.0 (the "License"); you may not use this file except in compliance
101with the License. You may obtain a copy of the License at
102
103 http://www.apache.org/licenses/LICENSE-2.0
104
105Unless required by applicable law or agreed to in writing, software
106distributed under the License is distributed on an "AS IS" BASIS,
107WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108See the License for the specific language governing permissions and
109limitations under the License.
110
111All code until 0.416 is licensed under the same terms as Perl itself,
112either Perl version 5.8.4 or, at your option, any later version of
113Perl 5 you may have available.
114
115=cut
116
117118µs1;
 
# spent 2.78ms (328µs+2.45) within List::MoreUtils::XS::firstres which was called 14 times, avg 198µs/call: # 14 times (328µs+2.45ms) by File::ShareDir::_search_inc_path at line 466 of File/ShareDir.pm, avg 198µs/call
sub List::MoreUtils::XS::firstres; # xsub