commit 9c636f3022e74d7ab68ae75c1d59a848c8597064
parent 6efff72c59073a7ba1041dd4f8bbbbe5e10ccf97
Author: Jared Tobin <jared@jtobin.io>
Date: Sat, 15 Nov 2025 07:45:51 +0400
lib: wider add optimization
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Data/Word/Wider.hs b/lib/Data/Word/Wider.hs
@@ -82,7 +82,7 @@ add_c#
-> (# Word#, Word#, Word#, Word# #) -- ^ addend
-> (# (# Word#, Word#, Word#, Word# #), Word# #) -- ^ (# sum, carry bit #)
add_c# (# a0, a1, a2, a3 #) (# b0, b1, b2, b3 #) =
- let !(# s0, c0 #) = L.add_c# a0 b0 0##
+ let !(# c0, s0 #) = plusWord2# a0 b0
!(# s1, c1 #) = L.add_c# a1 b1 c0
!(# s2, c2 #) = L.add_c# a2 b2 c1
!(# s3, c3 #) = L.add_c# a3 b3 c2