I am a bit of a newbie to Java (prior experience with C on embedded platforms), so please forgive me if this question is very trivial.
I need to implement some signal processing algorithms in Java. I know Java is probably not the best language to do this [1], but the Java requirement has come in primarily because the rest of my team is not comfortable with C at all.
What we need to do at a high level is to read some files containing video frames, process them (gather some statistics about them) and then write them back to disk. The processing will involve reading in a few kB of data and parsing them somehow, possibly with some kind of transforms. i.e. I expect we will need to do a lot of byte-addressed random memory accesses. And I'll need to do about 30 frames per second and a few tens of thousands of such operations every frame (so possibly 100s of 1000s of ops per second)
I do not know the 'internals' of Java very well, but from what I read I believe the memory that Java sees is far abstracted from the actual virtual memory that the OS itself provides [2].
What buffer management libraries should I use so that I can get the best possible performance? I've seen a few (NIO [3], Java 2d [4], etc) but I am not able to find which is faster, or if there are any other options that I am missing. Do you guys have any suggestions or pointers [5] for me?
I will also be doing lots of arithmetic, so are there any libraries that do 'faster' arithmetic? I come from a world where I could accelerate almost everything on the hardware but now I need to run this on a PC so I am not sure if there are any such options available.
Any other suggestions or help you guys could provide will be much appreciated!
- [1] Signal processing library in Java?
- [2] Is this understanding correct at all? Is there anywhere I can find out how "Java memory" maps to lower level memory?
- [3] http://download.oracle.com/javase/6/docs/api/java/nio/package-summary.html
- [4] http://java.sun.com/products/java-media/2D/index.jsp
- [5] No pun intended.