I at some point in my past was advised that sometimes using math to determine a thing was better than the actually logic, because the processing was shorter.

I don't remember what it was referring to, for, or if, or some sort of high-level shorthand

However, since then, I've been using math or mod instead of if's from time to time,

is that actually faster?
will the average future coder understand my use of mod?

eg, is it better to say:

for i from 0 to 10
whatever = i mod 5


for i from 0 to 10
if i < 5
whatever = i
whatever = i - 5