Files
scriptc/packages/runtime
Chris Tate ab341be202 Settle BigInt quotients from the top limbs, and vectorize limb shifts
A quotient-only BigInt division with a one-limb quotient returns Knuth's
estimate without a pass over the operands when the top limbs prove it:
with rhat * B + u0 - qhat * d0 at least qhat, a - qhat * b stays positive
whatever the lower limbs hold, since they subtract less than
qhat * B^(n-2). Otherwise one pass settles the estimate as before.

The add and subtract loops process eight limbs a pass, which rebuilds
the carry half as often. Left and right shifts, including the operand
normalization of the general division, form each limb from two source
limbs in a restrict-qualified helper with no dependency between limbs,
so the loops vectorize.
2026-10-24 15:19:33 -05:00
..
2026-07-22 18:08:04 -05:00
2026-10-23 20:51:00 -05:00