I am not new to perl , but I couldn't able to solve this usecase.
Here is my problem statement:
I am using Activestate perl 5.12 32-bit. I want to hold some 32 x 8MB array of double in Memory at a time. unfortunately, I am getting 'out of memory' error in this case. for example, the code below will lead to out of memory.
my $aref1 = [(.25) x (8*1024*1024)];
my $aref2 = [(.25) x (8*1024*1024)];
my $aref3 = [(.25) x (8*1024*1024)];
my $aref4 = [(.25) x (8*1024*1024)];
my $aref5 = [(.25) x (8*1024*1024)];
my $aref6 = [(.25) x (8*1024*1024)];
my $aref7 = [(.25) x (8*1024*1024)];
my $aref8 = [(.25) x (8*1024*1024)];
my $aref9 = [(.25) x (8*1024*1024)];
my $aref10 = [(.25) x (8*1024*1024)];
Is there any way to efficiently handle it?
Note: In any case, the access to the arrays is needed at any time of execution as fast as possible (since the user cannot wait soo long)
the options I have tried:
- DBM::Deep - It takes more time
- PDL - Gives 'out of memory' error for 32 x 8MB array of double
Awaiting your valuable suggestions!