Question: Speeding up computation

Hello all

I am new to maple. I am calculating a mutual information for a continuous distribution over a set of five elements. To approximate the continuous distribution I loop over percentage of integers from 0.01 to 0.99 in steps of .01 For five number this is like 10^10 iterations. Given two restrictions p_1+...+p_5 = 1 and p_1 <= ... <= p_5 this is reduced to something less than 10^7 iterations for the innermost loop. Still this process is very slow. (Well to be exact for some other reason there is another loop around all these which iterates 50 times.) But anyways, the performance is totally disappointing and it should be much faster.

I will appreciate any comment on how to improve the performance of this little program.

 

E.

Please Wait...