[Bleeding] Change Vec3DPool to a stack based pool
Avoid overhead of using an ArrayList and resizing it. Also allows for reuse of objects in the pool during the same tick by explicitly releasing them back to the pool. This allows for much better cache performance as well as reduced cache footprint.
This commit is contained in:
committed by
Travis Watkins
parent
d628c886d2
commit
8219081385
@@ -6,6 +6,7 @@ public class Vec3D {
|
||||
public double a;
|
||||
public double b;
|
||||
public double c;
|
||||
public Vec3D next; // CraftBukkit
|
||||
|
||||
public static Vec3D a(double d0, double d1, double d2) {
|
||||
return new Vec3D(d0, d1, d2);
|
||||
|
||||
Reference in New Issue
Block a user