[Numpy-discussion] [PATCH] a fix for compiling numexpr with MSVC Toolkit 2003

Timothy Hochberg tim.hochberg@ieee....
Sat Mar 10 12:18:30 CST 2007

On 3/9/07, David M. Cooke <cookedm@physics.mcmaster.ca> wrote:
> On Fri, 9 Mar 2007 16:11:28 +0000
> faltet@carabos.com wrote:
> > Hi,
> >
> > I've done a patch for allowing compiling the last version of numexpr
> with
> > the MSVC Toolkit 2003 compiler on Windows platforms. You can fetch it
> > from:
> >
> > http://www.pytables.org/trac/changeset/2514/trunk
> Checked in. It didn't match up; you've got about 150 more lines in your
> version than scipy's version.
> > BTW, I understand now why Tim Hochberg was so worried about the time
> > that it takes to compile numexpr on Win platforms. On my Pentium4 @ 2
> > GHz, and using the MSVC Toolkit 2003, compiling numexpr takes 20 minutes
> > aprox. (!). With the same machine and using GCC under Linux it takes no
> > more than 1 minute. Mmmm, I think it's time to look at the MINGW
> > compiler (GCC based).
> Wow! I wonder if lowering the optimisation level would help.

Yes. In my local copy, I use -O1, not -O2 and it compiles quite fast. It's
been quite a while since I measured it, but as I recall, dropping the
optimization didn't result in a noticeable performance decrease. In fact, I
have a vague recollection that it may have run slight faster?!  I guess it
might be a good idea to just use -O1 under variations of VCC.

Just to clarify my position though, compile time isn't my concern with the
switch statement. My worry there is that as the switch statement grows,
performance will take a hit as the switch overflows the code cache. Or
something like that. I'm unsure of the details, I just know that the python
dev crowd is always worring about that in the main interpreter loop.


> |>|\/|<
> /--------------------------------------------------------------------------\
> |David M. Cooke
> http://arbutus.physics.mcmaster.ca/dmc/
> |cookedm@physics.mcmaster.ca
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070310/0811d79a/attachment.html 

More information about the Numpy-discussion mailing list