in reply to Re^2: Best way to sum an array?
in thread Best way to sum an array?
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Best way to sum an array?
by BrowserUk (Patriarch) on May 25, 2017 at 15:44 UTC | |
by hippo (Archbishop) on May 25, 2017 at 16:08 UTC | |
by BrowserUk (Patriarch) on May 26, 2017 at 07:03 UTC | |
Re^4: Best way to sum an array?
by LanX (Saint) on May 25, 2017 at 13:01 UTC |