Subj : Re: Whats about a JIT? To : Clemens Eisserer From : Brendan Eich Date : Sat Oct 18 2003 01:43 pm Brendan Eich wrote: > Clemens Eisserer wrote: > >> Hi again! >> >>> Well, there is already at least one JIT for JS, that is a JVM >>> running Rhino which is a pure Java implementation based on early >>> SpiderMonkey code. Rhino by default translate JS into JVM byte code >>> which is then is executed diectly by JVM. >> >> >> >> Wow, Rhino is faster than SpiderMonkey, that beats all :-) >> >> Of course, if the JS is converted to Java-Bytecode before execution, the >> code can benefit from the Sun-JIT, which is the best JIT I know! > > > Those two paragraphs are not unrelated, as the "Of course" seems to > imply. The reason for Rhino beating SM is precisely the great Java > JITs (there are others than Sun's). In other words, and it wasn't at all clear that you knew this (sorry if you did): Rhino does generate Java bytecode (always has; interpreted mode came later), and therefore it benefits from Java bytecode JITting. /be .