You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the issue here is that we lack an func addWithCarry(a, b: T): tuple[v: T, overflow: bool] operation - both for normal integers and for this library - with such an operation one can write a recursive version of the algorithm that lines up the operations and carries in a single pass instead of the current inefficient comparison+add
Seen with @arnetheduck.
for uint128, stint properly generates add + adc (see #10)
But for uint256+, the way carry is done will loop multiple time on the low half
nim-stint/stint/private/uint_addsub.nim
Lines 17 to 29 in 9993b9d
Important for WASM codesize optimization.
The text was updated successfully, but these errors were encountered: