-
Notifications
You must be signed in to change notification settings - Fork 46
clean: some cleaning in GAS, EUC, EXP #2483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: arith-dev
Are you sure you want to change the base?
clean: some cleaning in GAS, EUC, EXP #2483
Conversation
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
| this.dividend = dividend; | ||
| this.divisor = divisorTrim; | ||
| this.dividend = dividend.trimLeadingZeros(); | ||
| this.divisor = divisorTrim.trimLeadingZeros(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Optimize Divisor Field Trimming
The divisor field is trimmed twice: divisorTrim already contains the result of divisor.trimLeadingZeros() from line 38, so calling trimLeadingZeros() again on it is redundant. The assignment should be this.divisor = divisorTrim; to match the original behavior and avoid unnecessary computation.
Signed-off-by: F Bojarski <[email protected]>
| this.dividend = dividend; | ||
| this.divisor = divisorTrim; | ||
| this.dividend = dividend.trimLeadingZeros(); | ||
| this.divisor = divisorTrim.trimLeadingZeros(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Unnecessary Trimming Impacts Performance
The divisor field is trimmed twice: once when creating divisorTrim at line 38, then again when assigning to this.divisor. This redundant operation wastes CPU cycles. The assignment should be this.divisor = divisorTrim; to match the pattern used for quotient at line 43.
Note
Decouples
EUCfromWcp, simplifiesGasinvocation, refinesEXPconstants, refactorsStpCall, adds an EXP duplicate test, and bumps the release version.EUC: RemoveWcpdependency; instantiate vianew Euc()inZkCounter/Hub; dropwcp.callLTand simplifycallEUC; trimdividend/divisorinEucOperation.Gas: Simplify API tocall(Hub, CommonFragmentValues); internally createGasParameters; update trigger inCommonFragmentValues.WORD_SIZEfor cutoffs inExpOperation(replacing hardcoded32).StpCall: refactor to useopCodeData.mnemonic()and passframe/opCodeto helpers; minor cleanups.ZkCounter: constructEucwithoutWcp.ExpTest.testExpLogDuplicate.releaseVersioningradle.properties.Written by Cursor Bugbot for commit 564f95d. This will update automatically on new commits. Configure here.