-
Notifications
You must be signed in to change notification settings - Fork 34
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
fix: Improve benchmarks quality and code duplication #178
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
huitseeker
requested review from
adr1anh,
porcuquine,
winston-h-zhang and
mpenciak
December 13, 2023 21:07
huitseeker
force-pushed
the
benchmarks_upheaval
branch
from
December 13, 2023 21:11
071988a
to
957fadf
Compare
- Constants have been introduced to replace hard coded values previously used in the verifier circuit and number of samples. - `bench_compressed_snark` function has been restructured, with a new `bench_compressed_snark_internal` function introduced to reduce duplication. - Similar refactoring has also been applied to `bench_compressed_snark_with_computational_commitments`, ensuring uniformity in the code and decreasing duplication. - The benchmark function has been updated to incorporate the use of the new constants as well as the refactored functions.
- Refactored benchmarking code in `compressed-snark-supernova.rs` for improved reuse and readability. - Introduced the use of constants for constant values. - Replaced hardcoded assignments with references to declared constants. - Eliminated duplicated benchmarking codes and introduced a shared function for increased efficiency.
- Improved the benchmarking system by introducing a new function `bench_recursive_snark_internal_with_arity`, which offers code reuse. - Replaced a hardcoded number with a constant (`NUM_CONS_VERIFIER_CITCUIT_PRIMARY`) and introduced a new constant (`NUM_SAMPLES`) for setting the benchmark group sample size, - Refactored the functions `bench_one_augmented_circuit_recursive_snark` and `bench_two_augmented_circuit_recursive_snark` to reduce code redundancy and improve maintainability. - Removed unnecessary assertions and error handling process with more concise `.expect` methods.
- Introduced named constants (`NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` and `NUM_SAMPLES`) for an enhancement of readability and maintainability. - Improved the benchmarking function through the replacement of hard-coded values with the newly initialized constants.
- Updated the `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` constant value in both `recursive-snark-supernova` and `compressed-snark-supernova` benchmarks for accurate evaluation. - Enhanced the documentation for `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` with detailed comments explaining its correlation with `test_supernova_recursive_circuit_pasta` and `num_augmented_circuits`. - Extended the `src/supernova/circuit.rs` module with a new test suite and additional functions to test supernova recursive circuits,
huitseeker
force-pushed
the
benchmarks_upheaval
branch
from
December 13, 2023 21:27
957fadf
to
5a3f9ac
Compare
huitseeker
force-pushed
the
benchmarks_upheaval
branch
2 times, most recently
from
December 14, 2023 02:59
43ff5d1
to
b4c3e5b
Compare
…bench - Updated public params sizing in `compressed-snark-supernova.rs`.
huitseeker
force-pushed
the
benchmarks_upheaval
branch
from
December 14, 2023 03:02
b4c3e5b
to
7121232
Compare
adr1anh
approved these changes
Dec 14, 2023
huitseeker
added a commit
that referenced
this pull request
Dec 14, 2023
* fix: correct bench group typo * refactor: Refactor snark benchmark code to remove duplication - Constants have been introduced to replace hard coded values previously used in the verifier circuit and number of samples. - `bench_compressed_snark` function has been restructured, with a new `bench_compressed_snark_internal` function introduced to reduce duplication. - Similar refactoring has also been applied to `bench_compressed_snark_with_computational_commitments`, ensuring uniformity in the code and decreasing duplication. - The benchmark function has been updated to incorporate the use of the new constants as well as the refactored functions. * refactor: Refactor Supernova SNARK benchmarks for code reuse - Refactored benchmarking code in `compressed-snark-supernova.rs` for improved reuse and readability. - Introduced the use of constants for constant values. - Replaced hardcoded assignments with references to declared constants. - Eliminated duplicated benchmarking codes and introduced a shared function for increased efficiency. * refactor: Refactor recursive SNARK benchmarking code - Improved the benchmarking system by introducing a new function `bench_recursive_snark_internal_with_arity`, which offers code reuse. - Replaced a hardcoded number with a constant (`NUM_CONS_VERIFIER_CITCUIT_PRIMARY`) and introduced a new constant (`NUM_SAMPLES`) for setting the benchmark group sample size, - Refactored the functions `bench_one_augmented_circuit_recursive_snark` and `bench_two_augmented_circuit_recursive_snark` to reduce code redundancy and improve maintainability. - Removed unnecessary assertions and error handling process with more concise `.expect` methods. * refactor: Refactor constants in recursive-snark.rs - Introduced named constants (`NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` and `NUM_SAMPLES`) for an enhancement of readability and maintainability. - Improved the benchmarking function through the replacement of hard-coded values with the newly initialized constants. * fix: update num_cons_verifier_circuit_primary * test: Refine supernova recursive circuit tests and benchmarks - Updated the `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` constant value in both `recursive-snark-supernova` and `compressed-snark-supernova` benchmarks for accurate evaluation. - Enhanced the documentation for `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` with detailed comments explaining its correlation with `test_supernova_recursive_circuit_pasta` and `num_augmented_circuits`. - Extended the `src/supernova/circuit.rs` module with a new test suite and additional functions to test supernova recursive circuits, * fix: also update constraint values in the loop * refactor: Refine public parameter size hints in compressed supernova bench - Updated public params sizing in `compressed-snark-supernova.rs`.
huitseeker
added a commit
that referenced
this pull request
Dec 14, 2023
* fix: correct bench group typo * refactor: Refactor snark benchmark code to remove duplication - Constants have been introduced to replace hard coded values previously used in the verifier circuit and number of samples. - `bench_compressed_snark` function has been restructured, with a new `bench_compressed_snark_internal` function introduced to reduce duplication. - Similar refactoring has also been applied to `bench_compressed_snark_with_computational_commitments`, ensuring uniformity in the code and decreasing duplication. - The benchmark function has been updated to incorporate the use of the new constants as well as the refactored functions. * refactor: Refactor Supernova SNARK benchmarks for code reuse - Refactored benchmarking code in `compressed-snark-supernova.rs` for improved reuse and readability. - Introduced the use of constants for constant values. - Replaced hardcoded assignments with references to declared constants. - Eliminated duplicated benchmarking codes and introduced a shared function for increased efficiency. * refactor: Refactor recursive SNARK benchmarking code - Improved the benchmarking system by introducing a new function `bench_recursive_snark_internal_with_arity`, which offers code reuse. - Replaced a hardcoded number with a constant (`NUM_CONS_VERIFIER_CITCUIT_PRIMARY`) and introduced a new constant (`NUM_SAMPLES`) for setting the benchmark group sample size, - Refactored the functions `bench_one_augmented_circuit_recursive_snark` and `bench_two_augmented_circuit_recursive_snark` to reduce code redundancy and improve maintainability. - Removed unnecessary assertions and error handling process with more concise `.expect` methods. * refactor: Refactor constants in recursive-snark.rs - Introduced named constants (`NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` and `NUM_SAMPLES`) for an enhancement of readability and maintainability. - Improved the benchmarking function through the replacement of hard-coded values with the newly initialized constants. * fix: update num_cons_verifier_circuit_primary * test: Refine supernova recursive circuit tests and benchmarks - Updated the `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` constant value in both `recursive-snark-supernova` and `compressed-snark-supernova` benchmarks for accurate evaluation. - Enhanced the documentation for `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` with detailed comments explaining its correlation with `test_supernova_recursive_circuit_pasta` and `num_augmented_circuits`. - Extended the `src/supernova/circuit.rs` module with a new test suite and additional functions to test supernova recursive circuits, * fix: also update constraint values in the loop * refactor: Refine public parameter size hints in compressed supernova bench - Updated public params sizing in `compressed-snark-supernova.rs`.
github-actions bot
pushed a commit
that referenced
this pull request
Dec 15, 2023
* fix: correct bench group typo * refactor: Refactor snark benchmark code to remove duplication - Constants have been introduced to replace hard coded values previously used in the verifier circuit and number of samples. - `bench_compressed_snark` function has been restructured, with a new `bench_compressed_snark_internal` function introduced to reduce duplication. - Similar refactoring has also been applied to `bench_compressed_snark_with_computational_commitments`, ensuring uniformity in the code and decreasing duplication. - The benchmark function has been updated to incorporate the use of the new constants as well as the refactored functions. * refactor: Refactor Supernova SNARK benchmarks for code reuse - Refactored benchmarking code in `compressed-snark-supernova.rs` for improved reuse and readability. - Introduced the use of constants for constant values. - Replaced hardcoded assignments with references to declared constants. - Eliminated duplicated benchmarking codes and introduced a shared function for increased efficiency. * refactor: Refactor recursive SNARK benchmarking code - Improved the benchmarking system by introducing a new function `bench_recursive_snark_internal_with_arity`, which offers code reuse. - Replaced a hardcoded number with a constant (`NUM_CONS_VERIFIER_CITCUIT_PRIMARY`) and introduced a new constant (`NUM_SAMPLES`) for setting the benchmark group sample size, - Refactored the functions `bench_one_augmented_circuit_recursive_snark` and `bench_two_augmented_circuit_recursive_snark` to reduce code redundancy and improve maintainability. - Removed unnecessary assertions and error handling process with more concise `.expect` methods. * refactor: Refactor constants in recursive-snark.rs - Introduced named constants (`NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` and `NUM_SAMPLES`) for an enhancement of readability and maintainability. - Improved the benchmarking function through the replacement of hard-coded values with the newly initialized constants. * fix: update num_cons_verifier_circuit_primary * test: Refine supernova recursive circuit tests and benchmarks - Updated the `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` constant value in both `recursive-snark-supernova` and `compressed-snark-supernova` benchmarks for accurate evaluation. - Enhanced the documentation for `NUM_CONS_VERIFIER_CIRCUIT_PRIMARY` with detailed comments explaining its correlation with `test_supernova_recursive_circuit_pasta` and `num_augmented_circuits`. - Extended the `src/supernova/circuit.rs` module with a new test suite and additional functions to test supernova recursive circuits, * fix: also update constraint values in the loop * refactor: Refine public parameter size hints in compressed supernova bench - Updated public params sizing in `compressed-snark-supernova.rs`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Elements to be addressed after this PR: