mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
[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:
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);
|
||||
|
||||
Reference in new issue
Block a user