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

Document scratch space requirements #69

Open
DavidBurkett opened this issue May 31, 2019 · 3 comments
Open

Document scratch space requirements #69

DavidBurkett opened this issue May 31, 2019 · 3 comments

Comments

@DavidBurkett
Copy link

This is probably a silly question, but how does one go about determining the scratch space size necessary? I'm trying to consume secp256k1_schnorrsig_verify_batch but can't find any documentation on how to determine the appropriate scratch space size.

@jonasnick
Copy link
Contributor

Not a silly question at all!

What do you mean by appropriate? Any scratch space size should work. More scratch space makes the function faster up to a certain point depending on the number of signatures to verify.

Perhaps we need a function that takes a number of signatures and returns the smallest scratch space size that maximizes the speed of batch_verify?

@DavidBurkett
Copy link
Author

Yes, a function like that is exactly what I'm looking for! In the meantime, a formula for calculating the smallest size that gives optimal performance would be very helpful.

@jonasnick
Copy link
Contributor

That's a pretty long formula and writing it out is almost as time consuming as making a PR with such a function. In the meantime you can use whatever you're comfortable with as there are diminishing returns anyway. If you have a specific workload you can also benchmark your implementation to check at which point you won't get a speedup anymore.

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

No branches or pull requests

2 participants