[Numpy-discussion] strange performance on mac 2.5/2.6 32/64 bit
Wed Nov 4 04:59:10 CST 2009
2009/11/3 Robin <email@example.com>:
> On Tue, Nov 3, 2009 at 6:14 PM, Robin <firstname.lastname@example.org> 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:
This seems surprising -- our HPC fortran codes use 32 bit integers on
64 bit linux. Do you get a performance hit in a pure fortran program?
Is it a problem with the gfortran compiler perhaps?
>> 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.
Fortran 90 introduced the INTERFACE block, which allows you to use
different variable types as arguments to what appears externally to be
the same routine. It then feeds the arguments to the appropriate
version of the routine. I don't think f2py supports this, but it would
be really useful if it could.
Regards, George Nurser.
More information about the NumPy-Discussion