in reply to Re^2: Performance issue in the loop.
in thread Performance issue in the loop.

Ah, nevermind, I realize I was comparing to your old code, not your optimized one. Yes the optimized one gets rid of the double check of $sums$j-$i so that works too.

Still, List::Util::max is faster than (sort...)[0]