From: Eric Hodel Date: 2006-05-16T04:02:09+09:00 Subject: Re: Compiling Ruby w/ Profile Guided Optimization On May 15, 2006, at 9:20 AM, Berger, Daniel wrote: >> -----Original Message----- >> From: Greg Buchholz [mailto:sleepingsquirrel@yahoo.com] >> Subject: Compiling Ruby w/ Profile Guided Optimization >> >> Since gcc-4.1 now has the option to perform profile >> guided optimization, I thought I'd try compiling a version of >> Ruby with this feature turned on. For the (somewhat >> contrived/synthetic) scenario below, it looks like compiling >> with profile guided optimization turned on, along with -O3, >> results in about a 9% speed increase vs. -O3 alone. >> YMMV. I compiled a version of Ruby-1.8.4 using the >> following config options... >> >> configure CFLAGS="-O3 -fprofile-generate" >> LDFLAGS=-fprofile-generate > > > > Odd, I thought Ruby died a horrible death if compiled with -O3. Has > that changed with gcc 4.x? On OS X Ruby can fail when compiled with -fschedule-insns2 which is in -O2. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com