On Sun, December 23, 2007 3:29 am, Ondrej Certik wrote: > Hi, > > I need to write 2D Ising model simulation into my school, so I wrote > it in Python, then rewrote it in Fortran + f2py, and also Cython: > > http://hg.sharesource.org/isingmodel/ > > And Cython solution is 2x faster than f2py. I understand, that I am > comparing many things - wrappers, my fortran coding skills > vs Cython C code generation and gcc vs gfortran. But still any ideas > how to speed up fortran+f2py solution is very welcomed.
When using g77 compiler instead of gfortran, I get a speed up 4.8 times. Btw, a line in a if statement of the fortran code should read `A(p(i,j,N)) = - A(p(i,j,N))`. Pearu _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
