-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: witness caching now operates on a bounded buffer (#1215)
* refactor: Refactor prove_recursively to accept IntoIterator - Update `prove_recursively` functions across several files (`prove.rs`, `nova.rs`, `mod.rs`, `supernova.rs`) to accept an `IntoIterator` instead of a `Vec`, allowing for more flexible input types. - Add `ExactSizeIterator` bound to the `IntoIterator` across the mentioned modules, enhancing function's safety and aiding in potential optimization. - Refactor iteration over steps by converting Vector to an Iterator, reducing the ownership requirements and accommodating iterator input. - Adjust the checking of the first element's arity in `nova.rs` to avoid consuming the iterator. * Refactor Store and lifetimes handling with Arc - Updated various places across the project which were using `Store` object directly, replacing it with the `Arc` type for safer shared ownership. This is further reflected in updated object initialization (e.g., `Store::default()` is now `Arc::new(Store::default())`). - Removed explicit lifetime specifier `'a` from multiple structures and functions, making the implementation more readable and efficient. This change has affected objects and files such as `NovaProver`, `SuperNovaProver`, `LurkProofWrapper` etc. - Modified various existing function signatures to eliminate direct references to the `Store` object and use `Arc<Store>` instead. Similarly, certain method arguments are updated to use references to the `Arc` instead. - Changes in the `MultiFrame` struct and `InterpretationData` to use Arc, resulting in improved lifetime management. This update required adjustments in function implementation as well. - Overall, these alterations do not affect logic or functionality but lead to better thread-safety and memory management in the system. The lifetime specification removal enhances code simplicity and readability. * refactor: Refactor proof module to employ a fixed-sized buffer of cached witnesses - Revise `prove_recursively` function to replace Mutex-protected steps iteration with a synchronous channel, streamlining parallelism. - Add a constant for maximum buffered frames in the proving process in `mod.rs`. * chore: adapt trie bench
- Loading branch information
1 parent
0d2ae13
commit 090931a
Showing
22 changed files
with
951 additions
and
782 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
090931a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmarks
Table of Contents
Overview
This benchmark report shows the Fibonacci GPU benchmark.
NVIDIA L4
Intel(R) Xeon(R) CPU @ 2.20GHz
32 vCPUs
125 GB RAM
Workflow run: https://github.com/lurk-lab/lurk-rs/actions/runs/8347157740
Benchmark Results
LEM Fibonacci Prove - rc = 100
ref=0d2ae13ceb55963aa4be94b65fb3d0194f92b411
ref=090931a24dbf871464ccb41eace5dc3b1f70f993
num-100
1.46 s
(✅ 1.00x)1.51 s
(✅ 1.03x slower)num-200
2.78 s
(✅ 1.00x)2.86 s
(✅ 1.03x slower)LEM Fibonacci Prove - rc = 600
ref=0d2ae13ceb55963aa4be94b65fb3d0194f92b411
ref=090931a24dbf871464ccb41eace5dc3b1f70f993
num-100
1.86 s
(✅ 1.00x)1.93 s
(✅ 1.04x slower)num-200
3.04 s
(✅ 1.00x)3.15 s
(✅ 1.04x slower)Made with criterion-table