From: "M. Edward (Ed) Borasky" Date: 2006-09-16T01:03:52+09:00 Subject: Re: Benchmark for Ruby A. S. Bradbury wrote: > On Friday 15 September 2006 03:48, M. Edward (Ed) Borasky wrote: > >> Once you know where Ruby is spending its time, play with compiler flags. >> gcc has oodles of possible optimizations, and gcc itself was tuned by >> processes like this. It's worth spending a lot of time compiling the >> Ruby interpreter, since it's going to be run often. > > I compiled Ruby on my system without --enable-pthreads and had a ~15-20% > performance increase in real-world runs of my application, which makes no use > of threads or external libraries. I emphasise that this is specific to my > system (linux kernel 2.6, nptl-only) and my application, but that's still a > non-insignificant performance increase for a real application run (rather > than a micro-benchmark). > > Regards, Alex > > Despite the fact that gizmos like hyperthreading and dual-core processors are the "default" in new boxes, a lot of "us" are still running on quite serviceable single-processor machines. For such machines, turning off pthreads when you recompile is usually a good thing, for Ruby and quite a few other languages and applications that implement their own threading models. Speaking of such, if you are set up to rebuild your Linux kernel, single-processor machines tend to run faster if you turn off SMP when you rebuild the kernel.