in reply to Re^2: Handling HUGE amounts of data
in thread Handling HUGE amounts of data
99.99% there - it ran out of memory when I hit the close button on the little Perl/Tk popup that comes up at the end to announce the data run was done.
Converting @aod into a string was a big improvement, but so was finding an array that was hiding in a sub routine. Sometimes you're just too close to see things.
Since I know the final user (my boy child) will want even more data, there's still a little more work to do.
#model 1; sub popnum1 { ( $x, $y, $z ) = @_; if ( $y == 0 ) { $aob[$x][0] = $initial + $z; } else { if ( substr ($aod[ $y-1],$x,1) ne 'a' ) { $aob[$x][$y] = $initial + $z; } else { $aob[$x][$y] = $z + $aob[$x][ $y - 1 ]; } } return $aob[$x][$y]; }
This is one version of the @aob generator. It's called only when the corresponding element in @aod is an 'a' (so it varies from one row to the next. $z is a freshly generated random number (floating point decimal plus or minus) - got rid of another memory eating array in favor of a single variable.
So @aob is the last big array to be tamed. But I'm gaining on it.;)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Handling HUGE amounts of data
by BrowserUk (Patriarch) on Jan 31, 2011 at 07:04 UTC | |
by Dandello (Monk) on Jan 31, 2011 at 07:40 UTC | |
Re^4: Handling HUGE amounts of data
by Dandello (Monk) on Jan 31, 2011 at 19:45 UTC | |
by BrowserUk (Patriarch) on Jan 31, 2011 at 20:07 UTC | |
by Dandello (Monk) on Jan 31, 2011 at 20:49 UTC | |
by BrowserUk (Patriarch) on Jan 31, 2011 at 20:52 UTC | |
by Dandello (Monk) on Jan 31, 2011 at 23:48 UTC | |
|