Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
perf: Tweak slot calculation algorithm #90
The previous slot calculation algorithm we use is optimized for large sequential programs. While this works for simpler cases, it often results in address conflicts in terms of programs with frequent branches. This PR changes the code to a new algorithm that balances between small basic blocks and large code segments. For our most common secp256k1 verification, this reduces ~15% of running time:
For more complicated programs, such as bn256g2 where branches are more frequent, we noticed a 4x speedup.