For a great while of my CP career I had no idea how such, at a first glance, insignificant things might affect the runtime of the code. And till this day I keep seeing many beginners having lack of knowledge about this effect, that's why I would like to share it here and hope it'll help you out someday.
First code: 164992399 — [1918ms]. In a while loop I access an element with parameter 2 at the else statement. This parameter just increases x and moves forward, while 2 first statements increase / decrease y + change an element in a matrix.
Second code: 164991769 — [280ms]. Here in a while loop I access an element with parameter 2 at the first if statement and other statements where I need to change matrix elements follow after.