I just tried it. Setting element 10000 of an array takes 0.35 MB more RAM than setting element 0 on perl 5.8.8 for OS X on Intel. So, there's a cost, although not a large one.
In reply to Re^3: Could we save the memory occupied by "undef" in an array?
by perrin
in thread Could we save the memory occupied by "undef" in an array?
by lightoverhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |