Lloyd Linklater wrote:
> SpringFlowers AutumnMoon wrote:
>> The performance gain I got from Ruby 1.8.6 to Ruby 1.9 is only from 
>> about 52,000 iterations per second to 58,000... I wonder why other 
>> people get so big performance gain instead.  is it because they compile 
>> their only Ruby 1.9.
> 
> If that is true, then is the release version specifically compiled to be 
> slow?  Which compiler is the best and which settings to use for a "roll 
> your own" ruby for windows?  Unix?
> 

As far as I've been able to determine, with gcc, the compiler settings
should be "-O3 -march=<architecture>", where <architecture> is the chip
name, for example "-O3 -march=athlon64". There doesn't seem to be much
gain from going from O2 to O3, but it's non-zero. The tests I've looked
at indicate that it's the "-march" piece that does the real job.
Incidentally, I saw a post go by somewhere that had "-march= -mcpu=
-mtune=" flags all set. The only one you want is "-march" -- the others
are redundant or ignored or both.

See http://www.jhaampe.org/software/ruby-gcc for the details.

I can't help you with the Microsoft or other Windows compilers. Cygwin
or MSYS/MinGW compiling, on the other hand, should work the same way as
Linux -- you've got gcc, so use "-march=" and "-O3".