Hello,
I compare Cython and Pythran on a very simple function and I am a little bit
disappointed by what I get:
# pythran export gradfft_from_fft(complex128[][], float64[][], float64[][])
def gradfft_from_fft(f_fft, KX, KY):
px_f_fft = 1j * KX * f_fft
py_f_fft = 1j * KY * f_fft
return px_f_fft, py_f_fft
I focussed on what we can get only with one core (no OpenMP).
The cython version with @cython.boundscheck(False) and
@cython.wraparound(False) is faster than the pythranized function. Pythran is
"only" as good as Cython without @cython.boundscheck(False) and
@cython.wraparound(False)...
The code is here:
https://bitbucket.org/fluiddyn/fluidfft/src/88c55f8ed44ef33a01e3f532518b4ba44672aab1/scripts/compare_cypythran/?at=default
Can Pythran reach the performance of Cython in this case?
Best regards,
Pierre
--
Pierre Augier - CR2 CNRS http://www.legi.grenoble-inp.fr
LEGI (UMR 5519) Laboratoire des Ecoulements Geophysiques et Industriels
BP53, 38041 Grenoble Cedex, France tel:+33.4.56.52.86.16