lua-users home
lua-l archive

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


I played around with the NestedVM...

I was able to compile the Lua executable into a MIPS binary and then
generate a Java class. Seems to work. Just as an arbitrary test I
executed a sieve in both the native and the Java version and the Java
version was about 10 times slower (7.5 seconds agains 77 seconds) and
consumed a little under 3 times the memory (66MB agains 150MB)...

Since the source code it generates is not good (doesn't even compile)
I couldn't see if there was a way to export the functions and maybe
prepare a pure Java version of Lua from this.

There are other possibilities on converting C code to Java, but I
think the main problem will be being able to keep Lua fast and using
few memory. Espetially using automatic tools...

Cherrs,

Thiago

On 1/25/07, Doug Currie <doug.currie@gmail.com> wrote:
On Wednesday, January 24, 2007 Philippe Lhoste wrote:

> We recently speculated on the possibility of writing a Lua interpreter
> in pure Java (for better portability).
> I don't know if something generic is usable....

Have you considered NestedVM? http://nestedvm.ibex.org/

> NestedVM provides binary translation for Java Bytecode. This is done
> by having GCC compile to a MIPS binary which is then translated to a
> Java class file. Hence any application written in C, C++, Fortran,
> or any other language supported by GCC can be run in 100% pure Java
> with no source changes.

e

--
Doug Currie
Londonderry, NH, USA