in reply to mem usage
Maybe fragmentation from extending the stack is using up a lot of memory. Try to avoid putting the entire file on the stack, and pre-extending its destination:
my @lines; $#lines = 12_000_000; @lines = (); push @lines, $_ while <IN>;
Note that shuffle already exists in List::Util.
Update: Fixed bug.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: mem usage
by halfcountplus (Hermit) on May 26, 2010 at 18:02 UTC | |
by ikegami (Patriarch) on May 26, 2010 at 18:10 UTC | |
by halfcountplus (Hermit) on May 26, 2010 at 18:40 UTC | |
by ikegami (Patriarch) on May 26, 2010 at 19:00 UTC | |
by halfcountplus (Hermit) on May 26, 2010 at 19:12 UTC |