Improve Math.DivRem performance
authorStephen Toub <stoub@microsoft.com>
Tue, 15 Nov 2016 12:28:20 +0000 (07:28 -0500)
committerStephen Toub <stoub@microsoft.com>
Tue, 15 Nov 2016 12:28:20 +0000 (07:28 -0500)
commitbd1f21d17c439481d7bc2a5219779e2474419a96
tree63632c0a2f4e2bfa438572a1220b356a3183cdf9
parent7bd7335b34b3e4ee650b5db4991d922e3fbc56ea
Improve Math.DivRem performance

Until the JIT is able to eliminate one of the two idiv operations, using a multiplication and subtraction is measurably faster than an extra division.
src/mscorlib/src/System/Math.cs