Improve performance
Improve performance

Cache some values into local variables to improve performance and aggressively inline a loop.

martincostello/adventofcode,martincostello/adventofcode,martincostello/adventofcode,martincostello/adventofcode