Permalink
Browse files

Slight speed improvement

  • Loading branch information...
1 parent da5036c commit be3a723086f9a8119a7935eefe7f2d9f98fefc64 @Raphfrk Raphfrk committed Dec 12, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/main/java/net/glowstone/GlowChunk.java
@@ -70,10 +70,12 @@ public int getZ() {
@Override
public int hashCode() {
- final int prime = 31;
+ //final int prime = 31;
int result = 1;
- result = prime * result + x;
- result = prime * result + z;
+ //result = prime * result + x;
+ //result = prime * result + z;
+ result = (result << 5) - result + x;
+ result = (result << 5) - result + z;
return result;
}

0 comments on commit be3a723

Please sign in to comment.