-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
P3help wantedinternal-issue-createdAn internal Google issue has been created to track this GitHub issueAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.Has been reviewed by someone on triage rotation.
Description
Long bigint literals written in hexadecimal format (such as 0x123456789ABDEFn
) should be kept as is. Currently GCC expands them to decimal bigint literals, which increases the compiled size significantly (up to ~20%).
Example:
const P = 0x2fadbe2852044d028597455bc2abbd1bc873af205dfabb8a304600f3e09eeba8n;
console.log(P);
is transformed to
console.log(21565680844461314807147611702860246336805372493508489110556896454939225549736n)
Many crypto libraries (hashing, verifiable computation, etc) include long list of large constants. Keeping such constants in hexadecimal form makes a big difference.
Writing the literals as BigInt("0xabc")
is a workaround but is not ideal due to increased compiled size and runtime cost.
This incurs up to 20% blow up in compiled code size.
Metadata
Metadata
Assignees
Labels
P3help wantedinternal-issue-createdAn internal Google issue has been created to track this GitHub issueAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.Has been reviewed by someone on triage rotation.