bluealloy / revm

Rust implementation of the Ethereum Virtual Machine.
https://bluealloy.github.io/revm/
MIT License
1.64k stars 551 forks source link

feat: use batch bn256 pair operation #1643

Closed Rjected closed 3 months ago

Rjected commented 3 months ago

We are currently not taking advantage of the batch pair operation from the bn library for the pairing check precompile.

This yields a ~27% speedup on the existing bench:

Crypto Precompile benchmarks/precompile bench | ecpairing precompile
                        time:   [2.2389 ms 2.2441 ms 2.2495 ms]
                        change: [-27.689% -27.469% -27.227%] (p = 0.00 < 0.05)
                        Performance has improved.