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 benchmark templates and sample benches for IPA #133

Merged
merged 11 commits into from
Oct 29, 2023

Conversation

mmagician
Copy link
Member

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@mmagician mmagician requested a review from a team as a code owner October 26, 2023 11:08
@mmagician mmagician requested review from z-tech, Pratyush and weikengchen and removed request for a team October 26, 2023 11:08
@@ -0,0 +1,57 @@
// #![cfg(feature = "benches")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// #![cfg(feature = "benches")]

Cargo.toml Outdated
Comment on lines 28 to 29
criterion = { version = "0.5", default-features = false, optional = true }
rand_chacha = { version = "0.3.0", default-features = false, optional = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm we don't want criterion as a normal dependency, as it has too many dependencies. criterion should be a dev-dependency.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, rand_chacha is already a dev-dependency.

@@ -0,0 +1,241 @@
use ark_crypto_primitives::sponge::{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make this a file in benches, or extract it into a separate crate (ala ark-algebra-bench-templates)

@mmagician
Copy link
Member Author

Thanks @Pratyush, I've refactored the bench templates into its own crate as suggested. This required creating a workspace, so there's a bunch of files moved around, but ultimately the actual changes are few and much more elegant. Adding benches for a new scheme will also hopefully be simpler.

Copy link
Member

@Pratyush Pratyush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change! The only thing that I think we should undo is the pcs renaming; it's fine to have the repo be called poly-commit and the folder within also called poly-commit.

@mmagician mmagician requested a review from Pratyush October 28, 2023 16:27
@Pratyush Pratyush added this pull request to the merge queue Oct 29, 2023
Merged via the queue into arkworks-rs:master with commit c724fa6 Oct 29, 2023
4 checks passed
mmagician added a commit to NP-Eng/poly-commit that referenced this pull request Nov 15, 2023
* Add benchmark templates and sample benches for IPA

Co-authored-by: Antonio Mejías Gil <[email protected]>

* adapt max poly degree to 20

* Move all PC Schemes to one module; bench-templates as a separate module

* inline one of the type aliases

* remove commented out comment

* Add benchmark instructions to the README

* make bench-templates non publishable

* fix yaml file: remove newline

* rename the inner dir to `poly-commit`

* rename usages of `pcs` to `poly-commit`

---------

Co-authored-by: Antonio Mejías Gil <[email protected]>
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.

2 participants