Date: Fri, 15 Feb 2002 19:51:11 -0800 From: Rob <rob@pythonemproject.com> To: Doug White <dwhite@resnet.uoregon.edu> Cc: "freebsd-chat@FreeBSD.ORG" <freebsd-chat@FreeBSD.ORG> Subject: Re: Why is Python slower on FreeBSD than Windows? Message-ID: <3C6DD72E.A122AAF6@pythonemproject.com> References: <20020215145841.O33755-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
I translate the code into Python so I can read it and figure out how it works. Later, if possible, I vectorize the code with Numeric to get the big speedup. The SciPy package now has the Weave module which takes a block of Python code and runs it thru the Blitz++ compiler, generating a library. I've gotten Python to run as fast as C with that one for FDTD sims. Rob. Doug White wrote: > > On Fri, 15 Feb 2002, Rob wrote: > > > I've been doing some prototyping of some number crunching programs on > > Python, and I found that Python is consistently slower on my laptop on > > FreeBSD than when I boot into Windows. For example, one program takes > > 800sec to run on FreeBSD and 300sec to run when I boot into Win2k. I am > > wondering if I should try setting -03 in make.conf and remake Python and > > Numpy. Right now I have just -O. > > Have you truss/ktrace'd your script? It might be getting bogged on > gettimeofday() or memory allocation or unblocked reads/writes. > > > ps. the program is available on my website below as somnec.py. > > Whee, translated Fortran (gag) ... this could be suffering from converted > code that does Evil Things(tm) in Python that Windows non-optimizations > actually seem to help. > > Doug White | FreeBSD: The Power to Serve > dwhite@resnet.uoregon.edu | www.FreeBSD.org -- The Numeric Python EM Project www.pythonemproject.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C6DD72E.A122AAF6>