Optimisation
whichonespink44 opened this issue ยท 3 comments
From @topisani on February 28, 2016 19:21
Quite a few things need some refactoring for performance reasons. This is going to be a central list of all of them.
- Use MutableBlockPos instead of BlockPos in loops
Copied from original issue: Team-RTG/1.8.9-Realistic-Terrain-Generation#26
@topisani I'm gonna be giving 1.8.9 some love this weekend... is this as simple as replacing all instances of BlockPos
with MutableBlockPos
? Or is the idea to use MutableBlockPos and its set() method to avoid creating millions of BlockPos objects?
this is really stupid microoptimization in most cases, but ye, the point is to use MutableBlockPos in tight loops, but only in those