in reply to Re^2: In-place sort with order assignment
in thread In-place sort with order assignment
BTW: If I ever manage to get the keys out of the hash and into an array without blowing memory, then I intend to use your Sort::Key to sort them in-place. But, there doesn't seem to be a an in-place version of keysort that doesn't take a callback?
It seems the interface is not very consistent... actually, the function exists, it is Sort::Key::_sort_inplace.
In any case, perl builtin sort will perform equally faster as @k = sort @k gets optimized by the interpreter into an inplace operation.
BTW, using the quicksort algorithm instead of the default merge sort will also help to reduce memory usage.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: In-place sort with order assignment
by BrowserUk (Patriarch) on Sep 19, 2010 at 19:37 UTC | |
by salva (Canon) on Sep 20, 2010 at 07:23 UTC | |
by BrowserUk (Patriarch) on Sep 20, 2010 at 07:47 UTC | |
by salva (Canon) on Sep 20, 2010 at 08:54 UTC | |
by BrowserUk (Patriarch) on Sep 20, 2010 at 12:10 UTC |