Divide and Get Remainder at the same time?

后端 未结 9 1130
不知归路
不知归路 2020-12-15 02:37

Apparently, x86 (and probably a lot of other instruction sets) put both the quotient and the remainder of a divide operation in separate registers.

Now, we can proba

9条回答
  •  时光取名叫无心
    2020-12-15 03:05

    In C#/.NET you've got Math.DivRem: http://msdn.microsoft.com/en-us/library/system.math.divrem.aspx

    But according to this thread this isn't that much an optimization.

提交回复
热议问题