So I wrote this language called C-Lesh to develop my own games for a variety of platforms and devices to ease portability and to revive a project which I started back in 2007. Anyways, I implemented the interpreter in Java for Android 2.1 and noticed how slow the code runs so I went back to drawing board and had the interpreter spit out source code which I could intergrate into an Android project. Code now runs like 3 - 4 times faster.
Now here's my question. How do people do with performance when creating interpreters on Android? Is the NDK (native development kit) of significant help when implementing an interpreter? I'm curious because it says the manual that native code is not necessarily much faster than Java code. The fact of the matter is that the C-Lesh interpreter does not do much overhead in interpreting code. Has anyone messed with Java native code and doesn't the Android JVM convert most of its bytecode into native code?
Some feedback would be much appreciated!
Experimenting with a Game Interpreter
Hmm. Guess no one knows. If anyone has written an NES or SNES emulator for Android I would love to hear how you did it.
It is an interesting question. You are right that the better emulators probably do generate JIT-compiled code, either that or they are emulating machines that are orders of magnitude slower than the target processor.
It would be hard, but if you figured out how to get your compiler to output ARM code into a shared library (.so) file, you could then call [color=#000000][font=Arial,]System.loadLibrary() to load the JIT compiled script code. [/font]
[color=#000000][font=Arial,]I have also read that NDK compiled code is not much faster, but in my experience it makes a significant difference![/font]
[color=#000000][font=Arial,]I have also read that NDK compiled code is not much faster, but in my experience it makes a significant difference![/font]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement