1

I do a lot of collision detection each frame and I use LIBGDX's com.badlogic.gdx.math.Intersector class. Would I gain any significant time performance (higher FPS) if I import the package as static and access it that way?

import static com.badlogic.gdx.math.Intersector.*;
... 
if(overlaps(circle, rectangle) { ... }

Or, by simply accessing the class directly each call it wouldn't make any difference at all?

import static com.badlogic.gdx.math.Intersector;
... 
if(Intersector.overlaps(circle, rectangle) { ... }
gogonapel
  • 788
  • 6
  • 17
  • 2
    This probably will not make any difference. Have you tried profiling your program to identify what the actual bottlenecks are?? – Amir Afghani Mar 27 '15 at 17:20
  • I know where my bottlenecks are , I cannot solve them entirely right now , apparently there is no solution for them : http://stackoverflow.com/questions/29290757/how-to-completely-disable-multiwindow-support-in-libgdx-game . So I'm trying to squeeze as much performance out of the code as I can! – gogonapel Mar 27 '15 at 17:26

0 Answers0