> Adam Ginsburg wrote: >> Much appreciated. I guess the various levels of yellow in the html >> file indicate the slow lines? I tried getting rid of all of my numpy >> calls in the loop by rewriting them as loops, but that hasn't improved >> speed at all, and in fact appears to have become slower. Right now a >> fortran (f2py) version goes ~75% faster and pure python goes ~25% >> faster, so I must be doing something wrong. > > Not necesarrily. > > If your Fortran code is only 2x faster than Python there's usually not > much Cython can do. Cython is for the times when Fortran is 1000x-2000x > faster than Python!
Sorry about exaggerating. That should have been about 200x to 2000x. Still two orders of magnitude from what you appear to be looking at, I'd be surprised if Cython can give you any real speedups here. (What's the size of your test data though? If f2py overhead comes into play then Fortran could really be faster, meaning more of a potential for Cython. I didn't really look at your code though.) Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
