On Thu, May 3, 2012 at 12:46 PM, Paul Anton Letnes
<[email protected]> wrote:
>
> Could you show us the code? It's hard to tell otherwise. As Keith Goodman 
> pointed out, if he gets 7.5x with cython, it could be that the Fortran code 
> could be improved as well. Fortran has a reputation of being the gold 
> standard for performance in numerical computation, although one can often be 
> surprised. Picking good algorithms is always more important than the language.
>

Doing array operations with Fortran might slow things down. I got the
speed up by calculating the distance one point at a time and not
storing the results (only keeping the min value and index). That gets
rid of the sorting (argmin) at the end too.
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to