-
Notifications
You must be signed in to change notification settings - Fork 56
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
[dev] [optimization] Division and modulus operations to div_rem #206
Comments
hi @b-j-roberts can I tackle this one? |
Hey @adrianvrj! |
@b-j-roberts optimizing the opcode is the best way to go, kindly assign |
Hi @b-j-roberts please can I work on this |
Hey @ShantelPeters! |
can i work on this? |
Hey @manlikeHB! |
Sure, I will assign you and check back in a couple days. Please lmk if you have questions |
@adrianvrj Assigned, thank you! |
<!-- enter the gh issue after hash --> - [x] issue #206 - [x] follows contribution [guide](https://github.com/keep-starknet-strange/shinigami/blob/main/CONTRIBUTING.md) - [x] code change includes tests <!-- PR description below --> This PR will add the usage of div_rem when using / and % in the same value. *Pending:* in utils.cairo file, the ``` fast_power ``` function is giving problems for using div_rem. Co-authored-by: Brandon Roberts <brandonjroberts22@gmail.com>
…range#219) <!-- enter the gh issue after hash --> - [x] issue keep-starknet-strange#206 - [x] follows contribution [guide](https://github.com/keep-starknet-strange/shinigami/blob/main/CONTRIBUTING.md) - [x] code change includes tests <!-- PR description below --> This PR will add the usage of div_rem when using / and % in the same value. *Pending:* in utils.cairo file, the ``` fast_power ``` function is giving problems for using div_rem. Co-authored-by: Brandon Roberts <brandonjroberts22@gmail.com>
To optimize shinigami, we should be using
div_rem
instead of%
and/
when doing these operations on the same number. So for each instance in the code where modulus and division are used together, we should change them to use div_rem instead to improve efficiency.References
Div rem example
Example of location to optimize in the code
The text was updated successfully, but these errors were encountered: