02-04-2010 09:47 PM
We wanted to develop audio software for the blackberry, a sequencer application similar to korg-ds 10 or LSDJ (maybe a little more complex). For this we need to write high performance digital signal processing code. This is possible on both IPhone and Android (which provides JNI). So my question is, given that java performance is not enough, how can we get to do this? Is it possible to write under anything faster than Java?
02-04-2010 10:00 PM
BlackBerry is Java only, it is not possible to access JNI (unless you talk to RIM).
02-04-2010 10:52 PM - edited 02-04-2010 10:53 PM
No problem, it's just the way things are right now.
From what I remember reading on some "undisclosed website" rapc converts the Java bytecode to a semi-ASM/bytecode combo. That way certain functions run faster then if the bytecode was interpreted because it is closer to the CPU. What does this mean? The BlackBerry could be using a JIT compiler but it most likely handles something that could need optimization in rapc and then have the rest interpreted.
I could be wrong about the JIT but for (from what I can tell) most of the time a JIT is an add-on to Java and often is not used for embedded devices (like cell phones).
02-05-2010 12:25 PM
I see. I don't think i've heard of any cellphone using JIT (as it can be a little memory intensive), but JNI would really help to get apps to levels of performance comparable to IPhone or Android. Though i guess given the berry likely doesn't use virtual address spaces (as it's all java), maybe RIM doesn't want to risk affecting the stability of the device...
02-05-2010 04:31 PM - edited 02-05-2010 04:41 PM
I have a feeling it has more to do with security. With Android and iPhone you can get overflows, invalid memory access, and other security problems that come from unmanaged coding. If it was possible to create the native JNI and send the project to RIM so they can verify it's "safe" I would probably want to do it for some apps.
EDIT: Also I the note of performance, to improve performance that is why they you need to do a second compile o a compiled Java application. It creates a semi-native application to speed it up as stated in the previous post.