Performance improvements
This commit is contained in:
1 parent
e6c8cb35e7
commit
28ee92b1b9
1 file changed
+2
-1
@@ -168,9 +168,10 @@ public static class ULongExtensions
|
||||
|
||||
ulong w1 = xLow * yHigh;
|
||||
ulong w2 = xHigh * yLow;
|
||||
ulong w3 = xLow * yLow;
|
||||
|
||||
ulong result = (xHigh * yHigh) + (w1 >> 32) + (w2 >> 32);
|
||||
result += (((xLow * yLow) >> 32) + (uint)w1 + (uint)w2) >> 32;
|
||||
result += ((w3 >> 32) + (uint)w1 + (uint)w2) >> 32;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user