Perl is not the most memory-efficient of languages. Quite the opposite. Many design decisions were made that trade memory for speed. For example, arrays are padded so you don't have to reallocate memory when they grow.
Playing around with Devel::Size can be informative.
You might find the PDL modules of use - they're good at efficient manipulation of N-dimensional arrays.
In reply to Re: why does this array take up so much memory?
by adrianh
in thread why does this array take up so much memory?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |