3 ms·
I dunno. I think by any measure being able to write "x / 3" will gain you productivity vs. "imul eax,2863311531; shr eax,1" (with the trip to the Hacker's Delig
by pcwalton 10y ago
I dunno. I think by any measure being able to write "x / 3" will gain you productivity vs. "imul eax,2863311531; shr eax,1" (with the trip to the Hacker's Delight page necessary to look up the magic number).
- psyklic 10y agoOr just use DIV/FDIV/FIDIV.
- mschuster91 10y agoDIV is way slower than MUL, so unless you need the extra precision or the result of the modulo, don't use DIV.
- psyklic 10y agoWe were talking about readability, not speed. (Of course, you could also just write a macro.)