With List::Util::sum() running 100x faster than the best pure perl equivalent, why wouldn't you use it even if you don't need the speed
It's a good question. The only answer which springs to mind is that you want to avoid loading List::Util in the first place because:
They are all edge cases anyway. And of course if you are one of the 99% who do have enough RAM etc. to load List::Util you get all the other good stuff in that module other than sum() essentially for free.
In summary: yes, I'd use it everywhere unless there's a demonstrable penalty.
In reply to Re^3: Best way to sum an array?
by hippo
in thread Best way to sum an array?
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |