Skip to content
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

Optimize uint256 multiplication #192

Open
chfast opened this issue Feb 25, 2021 · 3 comments
Open

Optimize uint256 multiplication #192

chfast opened this issue Feb 25, 2021 · 3 comments

Comments

@chfast
Copy link
Owner

chfast commented Feb 25, 2021

  1. We want to use the "loop" procedure as in mul_loop_opt().
  2. There, it may be good to separate first iteration which does not need to load p[] values as they are zeros. Compilers are not always able to figure it out.
  3. The best score was 60 instructions.
  4. Some experimentation: https://godbolt.org/z/915aeG.
@chfast
Copy link
Owner Author

chfast commented Apr 25, 2023

@chfast
Copy link
Owner Author

chfast commented Feb 15, 2024

@chfast
Copy link
Owner Author

chfast commented Apr 13, 2024

Prototype of u192 multiplication with mulx,adox,adcx: https://godbolt.org/z/6nbc3aafE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant