-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Checked signed integer multiplication (imulc and I256::checked_mul) use division to verify overflows. This is, I think, quite inefficient and unnecessary.
This issue captures the work to:
- Benched checked signed multiplication
- Investigate and implement possible alternative algorithms
One idea would be to multiply absolutes and then verify the sign afterwards. I'm not sure if this will work for I256::overflowing_mul (in that the wrapping produces different results), but it might be worth a try!
Metadata
Metadata
Assignees
Labels
No labels