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 benchmarks. #16

Closed
afck opened this issue Aug 29, 2018 · 7 comments
Closed

Add benchmarks. #16

afck opened this issue Aug 29, 2018 · 7 comments
Labels
good first issue Good for newcomers

Comments

@afck
Copy link
Collaborator

afck commented Aug 29, 2018

Our implementation still uses naive and probably slow algorithms in several places, especially for polynomials and commitments, and we should look into optimizing them. Whether #13 leads anywhere or not, the first step is adding benchmarks. I'm mainly thinking of polynomial multiplication and interpolation, but the more we cover, the better.

@fhaynes
Copy link
Contributor

fhaynes commented Sep 12, 2018

Hey everyone!
I started looking through the code. Looks like the remaining operations on polynomials could use benchmarks, with the exception of multiplication. I think those should be quite simple.

Beyond that, it looks like the BivarPoly trait could be benchmarked without much trouble. I'll have to read a bit more to see how to properly benchmark commitments.

Sound good? The crypto domain is a bit outside my normal Rust work, so if I suggest/say something ridiculous, please tell me. =)

@c0gent
Copy link
Contributor

c0gent commented Sep 12, 2018

Sounds good :)

@fhaynes
Copy link
Contributor

fhaynes commented Sep 13, 2018

Link to PR: #33
Ping me over there if changes are needed, assuming this ever finishes compiling...

@afck
Copy link
Collaborator Author

afck commented Sep 16, 2018

Hi @fhaynes, thank you for taking on this issue!

Having benchmarks for addition and subtraction certainly makes sense. However, I don't think they have much room for optimization since they don't involve any complicated computations. I think the main bottlenecks at the moment are the two methods that involve the (not yet optimized) single-value polynomial interpolation function: PublicKeySet::combine_signature and PublicKeySet::decrypt.

(And maybe there are other CPU intensive methods left unbenched, too, but I currently can't think of any.)

@fhaynes
Copy link
Contributor

fhaynes commented Sep 18, 2018

Sure. PR here: #35

@ErichDonGubler
Copy link

Since the (rebased) PR was merged by @afck, should this issue be closed?

@afck
Copy link
Collaborator Author

afck commented Sep 30, 2018

Yes, thank you for the reminder!

@afck afck closed this as completed Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants