Explanation for observed behaviour:
Summary:
Perl supports sparse arrays of a sort. Arrays that are extended, but not explicitly initialized do not require nearly as much memory as arrays that are extended and explicitly initialized. On an architecture with 32-bit C pointers, an array of length 1000000, that has not been explicitly initialized, will require only 4000000 bytes of RAM.
In reply to Re: Sparse arrays?
by MarkM
in thread Sparse arrays?
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |