in reply to Re^10: In-place sort with order assignment
in thread In-place sort with order assignment
next if defined $val; will skip any keys from %hash that we have previously assigned a value to.
$hash{$key} = $known{$key};next; will assign any values we learned from the last run and then move on to the next record.
$heap->insert($key); will only insert records into the heap for keys that we have not assigned a value to (either in a previous run or this run). Update: According to the documentation, max_count => $at_once will throw out items from the heap beyond that point. If that doesn't work as advertised, that may be the source of the additional memory.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: In-place sort with order assignment
by BrowserUk (Patriarch) on Sep 20, 2010 at 13:39 UTC |