Hi Andrea 2008/5/23 Andrea Gavana <[EMAIL PROTECTED]>: > Thank you very much for this! I am going to try it and time it, > comparing it with the other implementations. I think I need to study a > bit your code as I know almost nothing about Cython :-D
That won't be necessary -- the Fortran-implementation is guaranteed to win! Just to make sure, I timed it anyway (on somewhat larger arrays): Francesc's Solution: 0.062797403 Seconds/Trial Fortran Solution 1: 0.050316906 Seconds/Trial Fortran Solution 2: 0.052595496 Seconds/Trial Nathan's Solution: 0.055562282 Seconds/Trial Cython Solution: 0.06250751 Seconds/Trial Nathan's version runs over the data 6 times, and still does better than the Pyrex version. I don't know why! But, hey, this algorithm is parallelisable! Wait, no, it's bedtime. Regards Stéfan _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion