[SciPy-User] help speeding up a Runge-Kuta algorithm (cython, f2py, ...)

Jonathan Stickel jjstickel@gmail....
Sat Aug 4 14:35:17 CDT 2012


I am sure properly coded Cython is great, but I really struggled when I 
tried to use it. I found that it allows you to write really slow code 
without errors or warnings. I found the profiling tools to be only 
marginally helpful. So many different ways to do the same thing... which 
is the best? All the documentation is nice, but very long and dense.

I am having much more success with f2py (using F90 syntax). Either your 
code runs fast, or it simply will not compile (excepting segfault bugs 
that can sometimes be difficult to track down). Improved and updated 
documentation would be helpful, but otherwise f2py is now what I turn to 
when speed is crucial.

My 2 cents. YMMV.

Jonathan


On 08/04/2012 02:45 AM, scipy-user-request@scipy.org wrote:
> Date: Sat, 04 Aug 2012 03:03:38 +0200
> From: Sturla Molden
> Subject: Re: [SciPy-User] help speeding up a Runge-Kuta algorithm
> 	(cython, f2py, ...)
>
> Den 03.08.2012 21:05, skrev Pauli Virtanen:
>> >It's Fortran 77. You need to declare
>> >
>> >	double precision dzdt
>> >
>> >I'd suggest writing Fortran 90 --- no need to bring more F77 code into
>> >existence;)
>> >
> With the new typed memoryviews in Cython, there is no need to bring more
> Fortran of any sort into existance.;-)


More information about the SciPy-User mailing list