-
Notifications
You must be signed in to change notification settings - Fork 20k
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
Add more native bls benchmarks #30459
base: master
Are you sure you want to change the base?
Conversation
I've duplicated the benchmarks into their own files to make them easier to run standalone. But these will be removed before merging. |
I need to fill in gas values as well... |
If we want, I can include the generator for these (and the others I am about to add) as part of this PR. |
So actually, the only precompiles we are really lacking benchmark coverage for are MSM. Previous to this we only benchmark the following input pair counts: 1, 3, 16 25. The new benchmarks cover pair counts 1..32, 64, 128 , 512, 1024, 2048 and 4877 (the size of the fuzzer-found worst-case input that fits in a 10mil gas block). |
IMO, this is now ready for merge. |
Currently, our benchmark set only measure several input sizes for msm and pairing. This introduces more comprehensive benchmarks with a wider-variety of input sizes.
For pairing, inputs are random points (which is the worst-case for gnark's implementation). For msm, inputs are random points and scalars whose binary representation is all 1s (
0xfff..fff
)