From: Steven Lumos Date: 2006-05-25T08:24:30+09:00 Subject: Re: How to Improve Performance Now. Re: Zed and Luis drop the bomb onRuby's poor performance John Carter writes: > Hokay some concrete suggestions on speeding up the here and now.... > > A Good Thing would be to have a Performance test suite. You can't > optimize unless you have a realistic measure of performance. > > That would be a Good Thing for someone to create. > > Ruby is based on gcc, gcc has grown some nifty ways of speeding things > up. Ruby is in no way based on GCC. > Much of ruby was written _before_ gcc grew these features but it is > really worth considering now. That would be a really horrible idea. I get a nearly 10% faster[1] Ruby by compiling with something other than GCC. > A community "lets all clean up get Ruby -Wall -W clean" would be A Good Thing. When writing C and compiling with GCC, I use -ansi -Wall -Werror. I never bother to test code that emits warnings. When building large software distributions, most warnings come from platform issues and probably don't appear on the core developers' platforms. Matz applies patches for these as they are brought to his attention. > The register / cache / memory hierarchy speed differences are becoming > really really huge in modern machines. > > Some thought as to keeping things "in cache" especially in things with > tight inner loops like Ruby can make a Big difference. > > Thus a Good Thing to try would be to feed Ruby to cachegrind (a tool in > the valgrind.org suite) It would also be a shame to depend overly on single-platform tools that "optimize" for a single platform. Steve [1] If there is conspiracy, it's the enormous pushback that people who might otherwise be helpful are getting from Austin et. al. Any readers who are members of the performance hit squad should kindly replace the word "faster" with "happier" and move along. > John Carter Phone : (64)(3) 358 6639 > Tait Electronics Fax : (64)(3) 359 4632 > PO Box 1645 Christchurch Email : john.carter@tait.co.nz > New Zealand > > Carter's Clarification of Murphy's Law. > > "Things only ever go right so that they may go more spectacularly wrong later." > > From this principle, all of life and physics may be deduced.