I'm writing a simple implementation of the GJK algorithm (collision of convex shapes) in Java, and it involves a lot of simple calculations on 3D vectors. In terms of performance vs readability, would it be better to store the points as double[3] and have a whole host of static methods to process them (add, subtract, dot, cross, negate etc) or use a class with the methods contained within?
The problem with the array of doubles is that to do a simple subtraction (for instance) multiple loops are required if specialised methods are used, or the code becomes very long if they're hard-coded in. A Point object makes the code much more readable, but is it worth it for what I'm assuming is not an insignificant performance overhead?