Answer the question
In order to leave comments, you need to log in
Is it worth rewriting code for JNI?
Hi all!
I have a small OpenGL ES 2.0 mobile toy written in Java. Recently, after adding a large number of objects for which coordinates, matrices, normals, etc. are calculated (on the processor, not the GPU. I need to store this data later), there are small freezes. Of course, I'm not testing on the top-end device, but still.
Will there be any sense from the fact that I will rewrite the mat. functions for calculating normals, multiplying matrices and vectors in C? What will be the increase in the speed of these functions and is it worth it?
Answer the question
In order to leave comments, you need to log in
Hakito : It won't do you any good. Calls to native methods are much more expensive than normal calls. In addition, Java bytecode is translated into machine code (JIT, ART). It will only get worse. If you rewrite everything - perhaps it will be better.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question