-
Notifications
You must be signed in to change notification settings - Fork 364
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
feat(p/int256): Optimize int256
with two's complement implementation
#2846
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2846 +/- ##
==========================================
+ Coverage 60.92% 60.94% +0.02%
==========================================
Files 564 564
Lines 75267 75385 +118
==========================================
+ Hits 45854 45947 +93
- Misses 26041 26048 +7
- Partials 3372 3390 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
// | ||
// This function is convenient for operations that require a unit value, | ||
// such as incrementing or serving as an identity element in multiplication. | ||
func One() *Int { return int1 } |
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.
Shouldn't this return a pointer to a copy?
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.
fixed
Description
This PR optimizes the implementation of
int256
type. Key changes include:Performance Result
Additional improvements:
This change is expected to improve performance for most int256 operations. However, please note the performance degradation in division operations.
See Also
#2750 (review)
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description