From owner-freebsd-chat Fri Feb 15 19:54:17 2002 Delivered-To: freebsd-chat@freebsd.org Received: from mail19a.dulles19-verio.com (mail19a.dulles19-verio.com [161.58.134.133]) by hub.freebsd.org (Postfix) with SMTP id BCB9F37B404 for ; Fri, 15 Feb 2002 19:54:11 -0800 (PST) Received: from 198.104.176.109 (198.104.176.109) by mail19a.dulles19-verio.com (RS ver 1.0.60s) with SMTP id 024394576; Fri, 15 Feb 2002 22:53:16 -0500 (EST) Message-ID: <3C6DD72E.A122AAF6@pythonemproject.com> Date: Fri, 15 Feb 2002 19:51:11 -0800 From: Rob X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.5-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Doug White Cc: "freebsd-chat@FreeBSD.ORG" Subject: Re: Why is Python slower on FreeBSD than Windows? References: <20020215145841.O33755-100000@resnet.uoregon.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop-Detect: 1 Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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