void update(float timeSinceLastFrame) // update tile properties { uint totalTilesX = this.totalTilesX; uint totalTilesY = this.totalTilesY; for(uint idxColumn = 0; idxColumn < totalTilesX; ++idxColumn) { for(uint idxLine = 0; idxLine < totalTilesY; ++idxLine) { } } for(uint idxColumn = 0; idxColumn < totalTilesX; ++idxColumn) { for(uint idxLine = 0; idxLine < totalTilesY; ++idxLine) { } } }
This is likely going to give a great performance boost. Local variables are always the most efficient to access, as they are referencable directly by the op codes in the VM. Class members and global variables need sevaral steps to get to the final value.
I'll definitely look into optimizing the bytecode instructions to reduce the amount of steps needed for the VM to access the class members, but it will never be as quick as the local variables. So the above suggestion will always be valid.
Regards,
Andreas