2 ms·
Unfortunately the JVM is optimized for Java, rather than for computer languages in general. This is a problem because you can't just say execute function 'foo'
by tomjen3 15y ago
Unfortunately the JVM is optimized for Java, rather than for computer languages in general. This is a problem because you can't just say execute function 'foo' on object bar, you have to look up the type of bar to find foo and then execute it.
Clojure gets around this by having all its functions implement a standard interface, and Java 7 has sorta seen the light (still no closures, but they can kind be emulated).
JRuby just suffers.
- kaffiene 15y agoThe JRuby devs reported 25%+ speedups on a range of benchmarks using the new InvokeDynamic mechanism in Java 1.7u2. They also reported that they have more optimisations to do. Doesn't sound like Ruby is suffering on the JVM.
- ShardPhoenix 15y agoInvokedynamic in Java 7 (http://jcp.org/en/jsr/detail?id=292 http://jcp.org/en/jsr/detail?id=292) seems to have fixed this: http://ruby-lang.org.ru/post/5533.html http://ruby-lang.org.ru/post/5533.html