[Numpy-discussion] strange performance on mac 2.5/2.6 32/64 bit

Robin robince@gmail....
Tue Nov 3 13:12:02 CST 2009

On Tue, Nov 3, 2009 at 6:14 PM, Robin <robince@gmail.com> wrote:
> After some more pootling about I figured out a lot of the performance
> loss comes from using 32 bit integers by default when compiles 64 bit.
> I asked this question on stackoverflow:
> http://stackoverflow.com/questions/1668899/fortran-32-bit-64-bit-performance-portability
> is there any way to use fortran with f2py from python in a way that
> doesn't require the code to be changed depending on platform?

Including the -DF2PY_REPORT_ON_ARRAY_COPY option showed that the big
performance hit was from f2py copying the arrays to cast from 64 bit
to 32 bit.

Is there a recommended way to easily write fortran extensions that
work on both 32bit and 64bit machines (something like using
-fdefault-int-8 and f2py not casting on a 64 bit platform, and not
using the option and not casting on a 32 bit platform)?



More information about the NumPy-Discussion mailing list