Optimized this algorithm by iterating in a spiral pattern rather than linearly. This removes the data dependencies the reference implementation had on every iteration and brought the time it takes to solve a 201^2 grid from 0.13724713ms
down to 0.02504632ms
!