On Feb 11, 2016, at 4:33 PM, Vitaly Davidovich <vitalyd at gmail.com> wrote: > > Optimize better how? The concern here would be idiv but gcc seems to strength reduce this code without uint just fine. No, idiv-by-2 is not an issue. My concern is simply instruction count: add/shift vs. sub/shift/add.