|
speed!!!! |
HA!!! just shaved 40% off the calculation time. Since the expected value and the variance is always the same for every prediction, why calculate it over and over for each prediction? Calculate it once, and the sum is that value multiplied by the total number of predictions. Don't even need the arrays for them any more. Of course, this is only good for the special case that the probability is the same for all predictions. Ditched that array as well. Maybe I do my best programming when I'm tired, but not too much? Got that those 10x 1 million predictions down to 38 seconds. :) Brian Follow Ups: ● Re: speed!!!! - Roger Hunter 09:59:37 - 10/20/2013 (101092) (2) ● Re: speed!!!! - Skywise 20:18:04 - 10/20/2013 (101097) (0) ● Re: speed!!!! - Roger Hunter 12:08:37 - 10/20/2013 (101093) (1) ● Re: speed!!!! - Amit 12:22:55 - 10/20/2013 (101094) (1) ● Re: speed!!!! - Roger Hunter 13:45:21 - 10/20/2013 (101095) (0) |
|