in reply to why does this array take up so much memory?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Devel::Size
by htoug (Deacon) on Jan 27, 2003 at 12:28 UTC |