Map FAQ Products Download Sales Overview Resin tm compiles JavaScript to Java bytecodes and uses the Java virtual machine to execute its code. The primary benefit of direct compilation is speed.
Interpreters are slow.
Interpreting JavaScript in Java would be deadly slow. The compilation to Java bytecodes allows the generated code to be compiled by any JIT compiler. And, to be honest, writing Java bytecodes is cooler and more fun to implement. Although Caucho Technology is primarily focused on providing robust and bug-sparse products to its customers, the engineers need to play, too. Field References JavaScript's great strength is in its object model, using prototype-based inheritance to retrieve fields.