intx
intx copied to clipboard
Optimize uint256 multiplication
- We want to use the "loop" procedure as in
mul_loop_opt(). - 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. - The best score was 60 instructions.
- Some experimentation: https://godbolt.org/z/915aeG.
https://godbolt.org/z/GhfKv31vT
Prototype of u192 multiplication with mulx,adox,adcx: https://godbolt.org/z/6nbc3aafE