If you are doing matrix operations in Perl (which your code and variable name suggest), consider using the PDL module (it stands for Perl Data Lanuguage). This is a compiled C matrix library highly optimized for speed, and the data structures take up much less memory than native Perl arrays.
PDL is very full-featured, and overloads many common operators, so you can do matrix operations like addition and multiplication in a very DWIMmish way. The only downside is having to read through a small mountain of documentation.
In reply to Re: why does this array take up so much memory?
by FamousLongAgo
in thread why does this array take up so much memory?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |