Skip to content

Commit

Permalink
Breakdown of ECCVM::create_prover
Browse files Browse the repository at this point in the history
  • Loading branch information
codygunton committed Mar 12, 2024
1 parent eef04ca commit 03140fd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions barretenberg/cpp/scripts/analyze_client_ivc_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@
totals = totals.format(
sum_of_kept_times_ms, total_time_ms, sum_of_kept_times_ms/total_time_ms)
print(totals)

print('\nBreakdown of ECCVMProver::create_prover:')
for key in ["ECCVMComposer::compute_witness(t)", "ECCVMComposer::create_proving_key(t)"]:
time_ms = bench[key]/1e6
total_time_ms = bench["ECCVMComposer::create_prover(t)"]/1e6
print(f"{key:<{MAX_LABEL_LENGTH}}{time_ms:>8.0f} {time_ms/total_time_ms:>8.2%}")
4 changes: 4 additions & 0 deletions barretenberg/cpp/src/barretenberg/eccvm/eccvm_composer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace bb {
*/
template <IsECCVMFlavor Flavor> void ECCVMComposer_<Flavor>::compute_witness(CircuitConstructor& circuit_constructor)
{
BB_OP_COUNT_TIME_NAME("ECCVMComposer::compute_witness");

if (computed_witness) {
return;
}
Expand Down Expand Up @@ -67,6 +69,8 @@ template <IsECCVMFlavor Flavor>
std::shared_ptr<typename Flavor::ProvingKey> ECCVMComposer_<Flavor>::compute_proving_key(
CircuitConstructor& circuit_constructor)
{
BB_OP_COUNT_TIME_NAME("ECCVMComposer::create_proving_key");

if (proving_key) {
return proving_key;
}
Expand Down
1 change: 1 addition & 0 deletions barretenberg/cpp/src/barretenberg/eccvm/eccvm_composer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ template <IsECCVMFlavor Flavor> class ECCVMComposer_ {

void compute_commitment_key(size_t circuit_size)
{
BB_OP_COUNT_TIME_NAME("ECCVMComposer::compute_commitment_key");
commitment_key = std::make_shared<CommitmentKey>(circuit_size);
};
};
Expand Down

0 comments on commit 03140fd

Please sign in to comment.