Bukkit/CraftBukkit — comment on commit 6d198be88856379f14f70b8e2d1ace66bd6f1ab7
File: src/main/java/org/bukkit/craftbukkit/CraftChunk.java line 256
By mikeprimm:

x and z are local parameters and passed by value, so I'm sure the shifted values will be recognized as loop and method invariant. The method call overhead is there, for sure - but we try to minimize hacking on the vanilla code, which is what it would take to improve on this. In any case, the trick on this whole method (for getting an 'empty' chunk) was originally the opportunity to get the world-generated data (which was always generated-on-the-fly) for a chunk that might otherwise not exist or be loaded: having the biome data be chunk-persistent (and potentially disagree with the WCM) kind of introduces some concerns on its value - if the chunk exists but isn't loaded, the biome data can actually be incorrect: it works when it doesn't exist (since the WCM would be used to generate it ) or when the chunk is loaded (since the world call gets it from there). If the chunk is loaded, even with method overhead, this code will be loads faster than before.