in reply to Re: how apply large memory with perl?
in thread how apply large memory with perl?
Ok, I'm stumped. Why in the world does the second line below result in so much less memory usage than the first? Just because it allocates the space before starting to fill it?
@a=1..9e6; $#a=9e6; $a[$_-1]=$_ for 1..9e6;
Aaron B.
Available for small or large Perl jobs; see my home node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how apply large memory with perl?
by Anonymous Monk on Aug 09, 2012 at 03:54 UTC | |
|
Re^3: how apply large memory with perl?
by BrowserUk (Patriarch) on Aug 09, 2012 at 11:14 UTC |