[Numpy-discussion] timing results (was: record arrays initialization)

Keith Goodman kwgoodman at gmail.com
Thu May 3 16:08:23 EDT 2012


On Thu, May 3, 2012 at 12:46 PM, Paul Anton Letnes
<paul.anton.letnes at gmail.com> 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.



More information about the NumPy-Discussion mailing list