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

Add more native bls benchmarks #30459

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

jwasinger
Copy link
Contributor

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)

@jwasinger
Copy link
Contributor Author

I've duplicated the benchmarks into their own files to make them easier to run standalone. But these will be removed before merging.

@jwasinger
Copy link
Contributor Author

I need to fill in gas values as well...

@jwasinger
Copy link
Contributor Author

If we want, I can include the generator for these (and the others I am about to add) as part of this PR.

@jwasinger
Copy link
Contributor Author

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).

@jwasinger jwasinger marked this pull request as ready for review September 18, 2024 15:02
@jwasinger
Copy link
Contributor Author

IMO, this is now ready for merge.

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

Successfully merging this pull request may close these issues.

1 participant