Performance improvements

This commit is contained in:
Marek Lemańczyk committed 2025-09-30 03:12:33 +02:00
1 parent e6c8cb35e7
commit 28ee92b1b9
1 file changed
+2 -1
+2 -1
View File
@@ -168,9 +168,10 @@ public static class ULongExtensions
ulong w1 = xLow * yHigh; ulong w1 = xLow * yHigh;
ulong w2 = xHigh * yLow; ulong w2 = xHigh * yLow;
ulong w3 = xLow * yLow;
ulong result = (xHigh * yHigh) + (w1 >> 32) + (w2 >> 32); 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; return result;
} }