in reply to Re^3: This runs WAY too slow
in thread This runs WAY too slow
Of course, after posting this, I think I figured it out.
if ( $dr4 < 0 ) { #pre-populate deletion array; my @delarray = ( 0 .. $chntot ); @dlarray = shuffle @delarray; my $cndiea = 0; foreach my $del ( 0 .. $chntot ) { if ( $aod[$del][$yb] eq 'd' ) { $cndiea++; } } my $cnr = $cndiea; for my $xd ( 0 .. $chntot ) { my $xda = $dlarray[$xd]; if ( $aod[$xda][$yb] eq 'a' && $cnr < $incrsdel ) { $aod[$xda][$yb] = 'd'; $cnr++; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: This runs WAY too slow
by GrandFather (Saint) on Jan 17, 2011 at 08:04 UTC |