lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Kahlua does not generate bytecode, it's a plain bytecode interpreter.
I also doubt it benefits much from the JIT, it would be very hard for it to optimize for it or do any sort of predictions.

Still, my own benchmarks (possibly not fair or measuring the right thing) show it to be about the same speed as LuaJ, much faster than MiniJoe, Groovy, Cajuscript and Rhino, and about 30 times slower than plain Java.

On Mon, Aug 17, 2009 at 6:06 PM, Philippe Lhoste <PhiLho@gmx.net> wrote:
On 17/08/2009 14:58, steve donovan wrote:
There is at least one pure Java implementation of Lua (Kahlua) which
I'm aware of.  Their niche is smart phones.

Yes, looks like a viable solution as the JVM isn't too bad and has its own JIT compiler (HotSpot if I am not mistaken).

I wonder if Kahlua can benefit of new Java 7 JVM improvements for dynamic languages...

Although I don't know/recall if Kahlua is generating Java bytecode out of Lua code or if it is interpreting Lua bytecode with its own Lua interpreter. In the latter case, it might not gain as much a performance boost from HotSpot nor latest features.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --