From: Joel VanderWerf Date: 2009-02-02T11:42:34+09:00 Subject: Re: Minor 1.8 <-> 1.9 performance comparison gotcha M. Edward (Ed) Borasky wrote: > On Sun, Feb 1, 2009 at 5:55 PM, Joel VanderWerf wrote: >> M. Edward (Ed) Borasky wrote: >>> 2. You should also take advantage of the GCC '-march=' and '-mtune=' >>> options and specify exactly what kind of processor(s) you have. >> http://gcc.gnu.org/gcc-4.2/changes.html says: >>> -mtune=native and -march=native will produce code optimized for the >>> host architecture as detected using the cpuid instruction. >> Has anyone tried this with ruby? > > I have done it, but not recently. It's pretty easy to do. For example, > on my Linux Athlon64 X2: > > cd > export CFLAGS='-O3 -march=athlon64 -mtune=athlon64' > ./configure > make > make test # be sure the compiler didn't break something!!! > make benchmark # 1.9.x only! > sudo make install What about CFLAGS='-O3 -march=native -mtune=native' I was assuming that's how the new feature in gcc 4.2 works (only got 4.1 here at the moment). -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407