in reply to Re^3: Howto Avoid Memory Problem in List::MoreUtils
in thread Howto Avoid Memory Problem in List::MoreUtils
Hmm. I guess we have different understandings of the term In-place sort.
I was trying to sort (using the default algorithm), 20e6 elements which takes 400 MB, but it was consuming 1.4 GB gross (some memory has been return to the system by the time the second memcheck runs below).
C:\test>junk Mem after building array: 404,556 kb Mem after sorting array: 1,214,032 kb
Having read your post, I tried the _quickersort option. Things improve marginally, but:
C:\test>junk Mem after building array: 404,812 kb Mem after sorting array: 973,584 kb
But that still requires a gross memory usage of 1.3 GB. 2N additional memory is somewhat greater than logN.
A useful feature, and nice to know it's there, but not quite what I was expecting hoping for when you said in-place.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Howto Avoid Memory Problem in List::MoreUtils
by salva (Canon) on May 04, 2006 at 12:13 UTC | |
by BrowserUk (Patriarch) on May 04, 2006 at 12:30 UTC | |
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 | |
|