From: gabriele renzi Date: 2005-11-05T08:42:09+09:00 Subject: Re: Compiled version of Ruby Dean Wampler ha scritto: > Bruce Tate in his book "Beyond Java" argues that Ruby would benefit a > lot if it ran on top of the Java VM, e.g., the JRuby project. The > benefits would include years of effort to optimize performance and > easy access to Java libraries. On the other hand, a Ruby-specific VM > could be tuned for the specifics of the language. > > Has anyone analyzed the pros and cons of these two approaches? I think that there asre still issues for a ruby interpreter running on top of the jvm (I'm thinking of HotSpot here) or any other VM designed for static languages, since some ruby features would run suboptimally on it. Think for example of IronPython: it runs faster than CPython on the .net VM (CLR,which is similar to the jvm) for some benchmarks, and this is a great goal. But it is still tens of times slower than C# on the same runtime, since the VM does not provide mechanisms aimed at optimizing a language like python (or ruby). Anyway it is worth noting that SUN seem to be thinking of fixing some of the issues, see for example the news about a new opcode "invokedynamic" which is specifically thought to speed up dispatch in dynamically typed languages.