in reply to Re^5: Howto Avoid Memory Problem in List::MoreUtils
in thread Howto Avoid Memory Problem in List::MoreUtils
If you need 1.4GB to sort 400MB that means that you are probably converting numbers to strings inside the sort.
Yep! That's the problem.
{ ($c, $d) = ($a,$b); $c cmp $d
I wonder if that optimisation could be worked into the internal sort?
I started to suggest that if both had the (same) IOK or NOK flags set, then use a numeric comparison, but I guess it would only take one string embeded at the wrong place for the entire sort to have to be done over.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Howto Avoid Memory Problem in List::MoreUtils
by salva (Canon) on May 04, 2006 at 13:18 UTC | |
by BrowserUk (Patriarch) on May 04, 2006 at 13:42 UTC | |
by salva (Canon) on May 04, 2006 at 14:07 UTC | |
by BrowserUk (Patriarch) on May 04, 2006 at 14:40 UTC |