People have funny ideas about what actually matters. Stack Overflow is full of questions about, for example, is ++i
more "performant" than i++
. Here's an example of real performance tuning, and it's basically the same procedure for any language. If code is simply written a certain way "because it's faster", that's guessing.
Sure, you don't purposely write stupid code, but if guessing worked, there would be no need for profilers and profiling techniques.