Preliminary optimization (12% speedup)
Finished optimizations (26% speedup)