| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/x86_64-linux/List/Util.pm |
| Statements | Executed 20 statements in 1.56ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 56 | 1 | 1 | 1.21ms | 3.14ms | List::Util::first (xsub) |
| 1 | 1 | 1 | 72µs | 90µs | List::Util::BEGIN@11 |
| 1 | 1 | 1 | 33µs | 391µs | List::Util::BEGIN@12 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # List::Util.pm | ||||
| 2 | # | ||||
| 3 | # Copyright (c) 1997-2009 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
| 4 | # This program is free software; you can redistribute it and/or | ||||
| 5 | # modify it under the same terms as Perl itself. | ||||
| 6 | # | ||||
| 7 | # This module is normally only loaded if the XS module is not available | ||||
| 8 | |||||
| 9 | package List::Util; | ||||
| 10 | |||||
| 11 | 3 | 114µs | 2 | 108µs | # spent 90µs (72+18) within List::Util::BEGIN@11 which was called:
# once (72µs+18µs) by Moose::BEGIN@11 at line 11 # spent 90µs making 1 call to List::Util::BEGIN@11
# spent 18µs making 1 call to strict::import |
| 12 | 3 | 507µs | 2 | 750µs | # spent 391µs (33+358) within List::Util::BEGIN@12 which was called:
# once (33µs+358µs) by Moose::BEGIN@11 at line 12 # spent 391µs making 1 call to List::Util::BEGIN@12
# spent 358µs making 1 call to vars::import |
| 13 | 1 | 3µs | require Exporter; | ||
| 14 | |||||
| 15 | 1 | 40µs | @ISA = qw(Exporter); | ||
| 16 | 1 | 8µs | @EXPORT_OK = qw(first min max minstr maxstr reduce sum shuffle); | ||
| 17 | 1 | 3µs | $VERSION = "1.21"; | ||
| 18 | 1 | 2µs | $XS_VERSION = $VERSION; | ||
| 19 | 1 | 59µs | $VERSION = eval $VERSION; # spent 12µs executing statements in string eval | ||
| 20 | |||||
| 21 | 1 | 5µs | eval { | ||
| 22 | # PERL_DL_NONLAZY must be false, or any errors in loading will just | ||||
| 23 | # cause the perl code to be tested | ||||
| 24 | 1 | 4µs | local $ENV{PERL_DL_NONLAZY} = 0 if $ENV{PERL_DL_NONLAZY}; | ||
| 25 | eval { | ||||
| 26 | 1 | 3µs | require XSLoader; | ||
| 27 | 1 | 753µs | 1 | 714µs | XSLoader::load('List::Util', $XS_VERSION); # spent 714µs making 1 call to XSLoader::load |
| 28 | 1 | 4µs | 1; | ||
| 29 | 1 | 4µs | } or do { | ||
| 30 | require DynaLoader; | ||||
| 31 | local @ISA = qw(DynaLoader); | ||||
| 32 | bootstrap List::Util $XS_VERSION; | ||||
| 33 | }; | ||||
| 34 | } unless $TESTING_PERL_ONLY; | ||||
| 35 | |||||
| 36 | |||||
| 37 | 1 | 4µs | if (!defined &sum) { | ||
| 38 | require List::Util::PP; | ||||
| 39 | List::Util::PP->import; | ||||
| 40 | } | ||||
| 41 | |||||
| 42 | 1 | 44µs | 1; | ||
| 43 | |||||
| 44 | __END__ | ||||
# spent 3.14ms (1.21+1.94) within List::Util::first which was called 56 times, avg 56µs/call:
# 56 times (1.21ms+1.94ms) by Data::OptList::__is_a at line 143 of Data/OptList.pm, avg 56µs/call |