From: Austin Ziegler Date: 2006-05-23T20:41:02+09:00 Subject: Re: How to Improve Performance Now. Re: Zed and Luis drop the bomb onRuby's poor performance On 5/22/06, John Carter wrote: > Ruby is based on gcc, gcc has grown some nifty ways of speeding things > up. No. Ruby is *not* based on gcc. Ruby is based on ANSI C. Any GCC-specific performanced boosts would reduce Ruby's portability. > Currently Ruby is compiled -O2 usually for generic i386 > > Obvious answers > - Compile -O3, gcc, especially since version 4.0 has grown some really nifty > optimizations. Almost the whole point of version gcc 4 Be careful that those optimizations don't omit stack frames. You'll get an unusable Ruby. > Ruby is _not_ gcc warning clean. Some gcc warnings are actually performance related. Ruby should try to be clean on all compilers that don't try to give you warnings about compiler-specific things (like Visual Studio's new warnings about deprecated functions like printf). All that said, the best thing one can do to improve the performance of one's Ruby script is to have hard numbers about where your script is performing poorly and being absolutely *certain* that it's Ruby and not your algorithm. (That is, I know exactly why PDF::Writer is as dramatically slow as it is; I just don't have a fix for it, yet.) -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca