Skip to content

Commit

Permalink
feat: improve witness generation for cycle_group::batch_mul (#9563)
Browse files Browse the repository at this point in the history
Problem:

`cycle_group` has a heavy witness generation cost. Existing code
performs multiple modular inversions for every cycle_group group
operation in `batch_mul`

This was leading to 40% of the Prover time for `cycle_group` operations
being raw witness generation.

Batch inversion techniques are now employed to remove this cost.
  • Loading branch information
zac-williamson authored Jan 6, 2025
1 parent da5e95f commit 7da7f2b
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ TEST_F(join_split_tests, test_0_input_notes_and_detect_circuit_change)
// The below part detects any changes in the join-split circuit
constexpr size_t DYADIC_CIRCUIT_SIZE = 1 << 16;

constexpr uint256_t CIRCUIT_HASH("0x9ffbbd2c3ebd45cba861d3da6f75e2f73c448cc5747c9e34b44d6bc8a90b4a9c");
constexpr uint256_t CIRCUIT_HASH("0x48687216f00a81d2a0f64f0a10cce056fce2ad13c47f8329229eb3712d3f7566");

const uint256_t circuit_hash = circuit.hash_circuit();
// circuit is finalized now
Expand Down
Loading

1 comment on commit 7da7f2b

@AztecBot
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 7da7f2b Previous: da5e95f Ratio
wasmClientIVCBench/Full/6 80358.20862199999 ms/iter 73227.457503 ms/iter 1.10

This comment was automatically generated by workflow using github-action-benchmark.

CC: @ludamad @codygunton

Please sign in to comment.