commit 7a1741bab3dae68642b196652f001fdd74b9bda4
parent 466bdb354a23571a7dd1bdb097cb56a95593afdd
Author: Jared Tobin <jared@jtobin.io>
Date: Sat, 15 Nov 2025 08:21:55 +0400
lib: commentary
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/Data/Word/Limb.hs b/lib/Data/Word/Limb.hs
@@ -30,8 +30,7 @@ add_c#
add_c# a b c =
let !(# c0, s0 #) = plusWord2# a b
!(# c1, s #) = plusWord2# s0 c
- !o = or# c0 c1
- in (# s, o #)
+ in (# s, or# c0 c1 #)
{-# INLINE add_c# #-}
-- | Borrowing subtraction, computing 'm - (n + b)'.
diff --git a/lib/Data/Word/Montgomery.hs b/lib/Data/Word/Montgomery.hs
@@ -167,6 +167,8 @@ retr (Wider f) (Wider m) (W# n) =
let !res = retr# f m n
in (Wider res)
+-- NB massive register pressure
+
-- | Montgomery multiplication (FIOS), without conditional subtract.
mul_inner#
:: (# Word#, Word#, Word#, Word# #) -- ^ x