diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-08-17 12:55:33 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-08-19 09:50:57 -0500 |
commit | 858d36efc9045d952af21ca4c33ad2756a05f8ae (patch) | |
tree | 86bca5dcb13fbb61d73a513a6024461e1422a466 /src/main/java/net/minecraft/server/Chunk.java | |
parent | 6d777ade166a5543a293c9353d7e6910b4a52b17 (diff) | |
download | craftbukkit-858d36efc9045d952af21ca4c33ad2756a05f8ae.tar craftbukkit-858d36efc9045d952af21ca4c33ad2756a05f8ae.tar.gz craftbukkit-858d36efc9045d952af21ca4c33ad2756a05f8ae.tar.lz craftbukkit-858d36efc9045d952af21ca4c33ad2756a05f8ae.tar.xz craftbukkit-858d36efc9045d952af21ca4c33ad2756a05f8ae.zip |
Add iterator cache to UnsafeList and use it in hotspots
Adds a specialized iterator for the list and a pool of iterators to avoid
object churn. Also optimizes the clear() method to reduce object creation.
Diffstat (limited to 'src/main/java/net/minecraft/server/Chunk.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Chunk.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 9fedd372..fb9bf205 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -57,7 +57,7 @@ public class Chunk { this.heightMap = new int[256]; for (int k = 0; k < this.entitySlices.length; ++k) { - this.entitySlices[k] = new ArrayList(); + this.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // CraftBukkit - ArrayList -> UnsafeList } Arrays.fill(this.b, -999); |