[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to exploit multicore cpu w/ Lua?
- From: Robert Klemme <shortcutter@...>
- Date: Mon, 2 Apr 2012 11:22:47 +0200
On Mon, Apr 2, 2012 at 10:55 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Mon, Apr 2, 2012 at 9:57 AM, Robert Klemme
> <shortcutter@googlemail.com> wrote:
>> Considering the fact that it took Sun 7 years from the first working
>> implementation of G1 to the production release with Java 7 it may be
>> more worthwhile to work at jlua. :-)
>
> I must say that Lua on the JVM is a very pleasant experience. With
> LuaJava it was surprisingly easy to make Swing interfaces, etc. But
> LuaJava is a JNI-binding so you still have a single-threaded
> interpreter that needs all the special care discussed here. (LuaJava
> still has a show-stopper for more serious work; coroutines cannot call
> Java methods, due to its design)
That's not the type of JVM integration I had in mind.
> One loses performance[1] with a straight-JVM Lua (and there are a
How exactly do you define "straight-JVM Lua"? Are you referring to
LuaJava which uses JNI?
> number of others, like Kahlua, etc) but such an interpreter _can_ be
> designed to be thread-safe. (Whether such a beast exists, I don't
> know)
>
> steve d.
>
> [1] but then there is JNI overhead plus method dispatch via
> reflection, so in practice probably not so big a difference.
Hmm, since I am pretty new to Lua I don't know all the projects out
there. Is there actually someone attempting to write a Lua which
translates Lua to JVM bytecode and executes that? I figure that must
be the most efficient approach ("efficient" in terms of runtime
performance).
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/