in reply to Re: Can this script be Optimized?
in thread Can this script be Optimized?
"As far as I know, all of the functions provided by that module are implemented in C, so you also get a performance bonus."
Indeed, they are. List::Util also happens to make very efficient use of Perl's API (e.g. using multicall), allowing its functions to perform at speeds approaching Perl's built-in list operators (grep, map, sort).
"See also: List::MoreUtils"
This is also written in C (and also makes use of multicall), but has a fallback Perl implementation allowing it to be installed on machines lacking a C compiler.
If a function exists in both List::Util and List::MoreUtils (and because recent List::Util releases have been adding new functions, the overlap between them is growing), then prefer the List::Util one because it will be guaranteed to be implemented in C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can this script be Optimized?
by kcott (Archbishop) on May 01, 2014 at 09:03 UTC | |
by tobyink (Canon) on May 01, 2014 at 23:14 UTC | |
by kcott (Archbishop) on May 01, 2014 at 23:44 UTC |