The reason behind the question
For a physics-project, we want to analyze two surfaces (specified by a bunch of vertices) and calculate the volume between those surfaces. To be able to do this, we want to implement a two-dimensional interval-search tree. In total the asymptotic run time, will be close to O(n2log n).
The question
In summary we are going to implement an algorithm, which will be quite time-expensive. Furthermore, the algorithm doesn't profit from the highly optimized math libraries in matlab. Therefore, we are considering to call Java from matlab. Conclusively we would like to know:
"To what degree is Java faster than matlab, ignoring the highly optimized performance from the math libraries in matlab?"
and
"Is there any significant delay when repeatedly calling a java method from matlab?"
e.g. does the JVM have to be started every time the method is called? does the jar have to be loaded every single time the method is called?
I hope some of you could help me (and maybe others) with this question.