On Feb 11, 2008 9:24 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > On Mon, 2008-02-11 at 20:42 -0700, Charles R Harris wrote: > > > > > > On Feb 11, 2008 7:10 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > > > > On Feb 11, 2008 5:40 PM, Charles R Harris > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > On Feb 11, 2008 1:21 AM, Robert Kern <[EMAIL PROTECTED]> > > wrote: > > > > > > > I've just updated the SVN trunk to get the latest numscons > > merge. > > > > Something broke the support I put in for the setuptools > > "develop" > > > > command. In order to make sure that setuptools' "develop" > > works with > > > > numpy.distutils' "build_src", we override the "develop" > > command to > > > > reinitialize the "build_src" command to add the --inplace > > option. This > > > > used to work as of r4772, but now any Fortran Extensions > > have the > > > > generated sources added twice. This causes links to fail > > since the > > > > same symbol shows up twice. > > > > > > > > > > While we're talking build, how do I set the compiler flags? > > Numpy here > > > always compiles with -march=i386, which seems a bit > > conservative. My > > > environment flags are also ignored, but I assume there is > > someway of getting > > > the compile to behave. > > > > Well, you assumed wrong :) > > > > For some reason I was hoping you would pipe up :0) Yeah, that in > > itself is a good reason for trying something like scons. > > To be more exact: you can simply add flags in distutils. It is just that > there is not much logic to handle different cases (e.g. having different > set of warnings for pyrex vs swig vs normal C extensions is difficult). > > > I note that with -O2 -finline-functions, or -O3, I can knock almost > > 30% off the string sort times. That's a lot better than I can do > > fooling around with the code. > > You should be able to do it just with numpy.distutils: > > CFLAGS="-O2 -finline-functions" setup.py build >
Curiously, CFLAGS="-O3 -finline-functions" causes the -fno-strict-aliasing flag to disappear when the random module is compiled, resulting in a lot of warnings and, in my experience, probably buggy code generation. So a safer bet is CFLAGS="-O3 -finline-functions -fno-strict-aliasing" . Chuck
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion