Joel VanderWerf wrote: > M. Edward (Ed) Borasky wrote: >> On Sun, Feb 1, 2009 at 5:55 PM, Joel VanderWerf >> <vjoel / path.berkeley.edu> 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 <ruby-source> >> 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). > That should work. Actually, I need to read the manual -- you don't need both "-march" and "-mtune" IIRC, and one of them is "deprecated". > gcc --version gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291] -- M. Edward (Ed) Borasky I've never met a happy clam. In fact, most of them were pretty steamed.