Re:Int 80h (2001)
by pcwalton on Sunday August 21, 2016 @01:58PM
(#12331913)
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).
[ Parent
| on HN ]
Or just use DIV/FDIV/FIDIV.
Re:Int 80h (2001)
by mschuster91 on Sunday August 21, 2016 @06:00PM
(#12332914)
DIV is way slower than MUL, so unless you need the extra precision or the result of the modulo, don't use DIV.