[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:
Mike Primm authored and Travis Watkins committed 2012-08-19 09:50:57 -05:00
1 parent d628c886d2
commit 8219081385
3 files changed
+64 -13

No files matched your search

@@ -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);