public class NewMatrix3 { private Vector3 x, y, z; private Point3 w; ... }The matrix has now subobjects, which bring their own methods. From a programming point of view this makes lots of things easier (at least in my opinion =)) Particularily I tried this:

public Point3 multiply(Point3 p) { Point3 r = new Point3(w); Vector3 dx = x.multiply(p.getX()); Vector3 dy = x.multiply(p.getY()); Vector3 dz = x.multiply(p.getZ()); r.translate(dx); r.translate(dy); r.translate(dz); return r; }The purpose of this method is to transform a point in space by the matrix. The method is unorthodox, but much more visual than plain row/column dot-product multiplication. The result point is translated into the origin of our coordinate system and a linear combination of the axis vectors is added to the origin point. So mathematically all should be right ?!! Hope so, but thats not the point. We have a method here with at least 3 local objects, the vectors dx, dy, dz, which are allocated inside the scalar multiply method of vector3. When I understand right, these are perfect candiates for escape analysis. Thats a thing I really dislike about java... code like this is simply not feasible from a performance standpoint (at least it was), but is perfectly fine in c++ ;-( I really would appreciate to write like this. So I tried this: -server -XX:+DoEscapeAnalysis with a small test program:

NewMatrix3 matrix = new NewMatrix3(); matrix.loadAxisAngleRotation(30, new Vector3(1,1,1)); Point3 p = new Point3(); for(;;) { p.set((float)Math.random() * 100f, (float)Math.random() * 100f, (float)Math.random() * 100f); Point3 r = matrix.multiply(p); System.out.println(r.getX()); }Unfortunately there is NO difference to no escape analysis at all. The netbeans profiler reports a hell of lots of Vector3 objects that are allocated. But if I got this right, none should be allocated at all. I really appreciate some help. Because I like java and there are advantages to come later on in game programming, like good scripting support, continuations via javaflow, reflection, low compilation times, runtime code loading. But this sacrifice of readability in exchange for performance is really a pain. I am even thinking of porting my project to C++... :-( I would really appreciate help in this case. Btw. escape analysis seems to work somehow, as it lowered total object creation in my main program. So it does at least something. But i believe the example I provided should be the standard case for escape analysis and should provide a stellar speed up, shouldn't it ?! Thank you! Really desperate for help, Frederick