Closed Bug 1912773 Opened 2 years ago Closed 1 year ago

Fold BigInt x ** 2n to x * x

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file)

JetStream 3's bigint-paillier benchmark has some x ** 2n expressions which could be folded to x * x.

MPow::foldsConstantPower also folds x ** 3 and x ** 4, but doing that
for BigInt means creating more temporary BigInt values. So it seems better
to only support x ** 1 and x ** 2 for now.

Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/abea9e5b35d3 Add MBigIntPow::foldsTo. r=spidermonkey-reviewers,iain
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: