This is not an apples to apples comparison, the implemented Languages are fundamentally different. I do think this is an inspiring factoid that shows what is possible with a well done JIT. Go Rubinius!
how are they very different? Syntax aside, Lua and Javascript are actually pretty similar. I would say they actually are close cousins.
The basic problem faced by a JS engine is that if it wants to be able to inline a function it has to be able to either:
* Prove that it knows everything that the function may do -- in effect this means you can't inline any functions that themselves call functions, or any functions that interact with any values you can't consider constant, or identify before you enter the inlined code; or
* Have the ability to at any point in time reconstruct the call stack, and all arguments correctly.
One of these choices is exceedingly limiting in what you can do, and the other is vastly complex.