4 ms·
For the JVM there is a native (no JNI) Lua port called luaj: http://luaj.sourceforge.net/ http://luaj.sourceforge.net/ I would be interested to hear anyone's
by clumsysmurf 13y ago
For the JVM there is a native (no JNI) Lua port called luaj:
http://luaj.sourceforge.net/ http://luaj.sourceforge.net/
I would be interested to hear anyone's experience using luaj on Android (thats where I plan to use it), and how it may compare to other options like Rhino.
- e12e 13y agoI'd love to hear how that works out -- generally I'd think it wasn't the best idea -- and that you'd be better off using actual lua (via the ndk): http://partiallyappliedlife.blogspot.no/2009/06/lua-on-java-on-dalvikvm-on-android.html http://partiallyappliedlife.blogspot.no/2009/06/lua-on-java-... See also: https://groups.google.com/forum/#!topic/android-developers/7PTpMTilY4E https://groups.google.com/forum/#!topic/android-developers/7... and: https://github.com/roscopeco/deelang https://github.com/roscopeco/deelang
- dottrap 13y agoI concur it is probably not a good idea. I know from other benchmarks that Dalvik in general has terrible performance and adding a layer on top of it is just going to make it worse. [3 days ago on HN] Dalvik vs. SpiderMonkey vs. Native https://news.ycombinator.com/item?id=6173757 https://news.ycombinator.com/item?id=6173757 Appcelerator originally did Rhino on Dalvik and moved to V8 after benchmarks showed Rhino was terrible. http://developer.appcelerator.com/question/133696/what-is-v8-what-is-rhino-what-is-android-runtime http://developer.appcelerator.com/question/133696/what-is-v8...
- dottrap 13y agoI never got past initial investigation of kahlua and luaj. However, they were appealing because I had a large server application based in Java that utilized spawning off other processes to help map/reduce data. We had written Lua scripts to do these helper tasks. But because of the Java, it was very expensive to spawn off other tasks, because they also needed to be wrapped in Java and starting a new Java instance ate a lot of memory and had a slow start up. The idea was to use kahlua or luaj to do the same helper tasks within the main process so other Java instances wouldn't have to be spawned. But for Android, plain old C based Lua works great with the NDK. There is also LuaJava and JNLua which can cross the native/Java bridge.