![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: Re: Hypergeometric Probability Calculation (speeding up 'choose' )by Itatsumaki (Friar) |
on Dec 05, 2003 at 17:12 UTC ( #312561=note: print w/replies, xml ) | Need Help?? |
Oh wow... that benchmark isn't lying: doing it this way is radically faster. After some thought this morning, I had figured I would need to pre-calculate and store the first 15k factorials rather than do the calculation each time, but these changes help avoid that. Thank you.
In Section
Seekers of Perl Wisdom
|
|