Well, it still throws an 'out of memory' when I close the little Perl/Tk that announces the script has finished running.
I assume I've done this right as BrowserUk suggested using Tie::Array::Packed to save on RAM:
tie @aob, 'Tie::Array::Packed::DoubleNative'; #model 1; sub popnum1 { ( $x, $y, $z ) = @_; if ( $y == 0 ) { $aob[$x][0] = $initial + $z; $zaza = $aob[$x][0]; } else { if ( substr( $aod[ $y - 1 ], $x, 1 ) ne 'a' ) { $aob[$x][$y] = $initial + $z; $zaza = $aob[$x][$y]; } else { $aob[$x][$y] = $z + $aob[$x][ $y - 1 ]; $zaza = $aob[$x][$y]; } } return $zaza; }
I figure that returning a single variable ($zaza)is more efficient than returning $aob[$x][$y] - it's hard to tell.
In reply to Re^4: Handling HUGE amounts of data
by Dandello
in thread Handling HUGE amounts of data
by Dandello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |