Switching to for loops made up a large portion of the optimizations in `tiles`.