Those of us of a certain age grew up hearing the oversimplification  
"compilers are fast, interpreters are slow"
I think the lesson from Java is that the compilation step can be more  
effective when it has the benefit of having execution time data about  
this instance's execution path/dataset. For this reason, the default  
configuration of the Sun's server JVM is to not not compile a method  
until its been executed 10,000 times. This is the primary reason that,  
for most benchmarks, a Java implementation will perform better than a  
C/C++ implementation.

There are many post 1.8.6 Ruby runtimes that offer significant  
performance gains. For me, as someone who chooses to work on  
performance focused projects, I think that the JRuby is most  
compelling, because of the amazing toolset it implicitly brings with  
it. Profilers like YourKit, Jxinsight and Wily are light-years ahead  
of anything available to us on native Ruby 1.8.6 or any other  
commercial software platform.

Peter


On Jun 15, 2009, at 4:56 AM, Mike Stephens wrote:

>
>> first candidate way is using compiler.
>
> A general question for everyone - I would have thought it would be  
> quite
> difficult to write a complier for Ruby, in the sense that your script
> gets translated to machine code. Ruby is very late-binding and weakly
> typed so you can't predict what is going to be going on at run time. I
> see some ostensible Ruby compilers on web searches but are they  
> genuine?
> Would they do anything for execution speed?
>
> -- 
> Posted via http://www.ruby-forum.com/.
>