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
{{ message }}
Repository navigation
JS Nat.pow performs one recursive multiply per exponent step #1699
I compiled that to .mjs and called power(i & 1, 512 + (i & 511)) 1,000 times per round. Nine warmed alternating rounds on Linux x64/Bun 1.3.13: median 4.297 ms at PR #1682's existing 0b82c20 head, 0.199 ms with checked repeated squaring. Both sums were 500. This is a bounded workload, not an application-wide speed claim.
The new path keeps the 48-bit result limit, uses arithmetic halving for the full Nat exponent, and skips an unused final square. Regression coverage includes zero-to-zero, wide exponents for zero/one, the largest valid base to power one and an overflowing result. This is an algorithmic lowering improvement, not a request to reopen the deferred general JS stack issue #798.
Activity