2 ms·
For integers only. For floats, a compiler will typically only do strength-reduction if you ask it to explicitly, because it changes the answer, so it technical
by bzbarsky 15y ago
For integers only. For floats, a compiler will typically only do strength-reduction if you ask it to explicitly, because it changes the answer, so it technically an invalid optimization.