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

Ryan Krauss ryanlists@gmail....
Tue Aug 7 11:37:31 CDT 2012


Thanks Stula.  That code compiles just fine and will go a long way
toward helping me understand how to use Cython to write fast code for
these kinds of applications.

For many Runge-Kutta steps, your Cython code is 200 times faster than
my pure Python version.  Fortran is still 1.6 times faster than the
Cython version, but the Fortran version is much more work to code up.

Thanks again,

Ryan

On Mon, Aug 6, 2012 at 6:18 PM, Sturla Molden <sturla@molden.no> wrote:
> Den 06.08.2012 15:51, skrev Ryan Krauss:
>
>> Thanks to Sturla for helping me get this working in Cython.
>>
>> I am trying to compile the code to compare it against fortran for
>> speed.  I have run into two bugs so far (I mentioned that my C skills
>> are weak).
>>
>
> Sorry, I should have debugged :(
>
> This one compiles with
>
>    $ python setup.py build_ext
>
> Is this what you wanted?
>
>
>
> Sturla
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list