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.
In reply to Re^2: how apply large memory with perl?
by aaron_baugher
in thread how apply large memory with perl?
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |