Skip to content

Commit

Permalink
feat(avm): make ProverPolynomials::get_row return references (#7419)
Browse files Browse the repository at this point in the history
This makes the computation of logderivatives ~20x faster, and proving a
public token transfer goes from `60s` to `14s`.

The cost is verbosity.
  • Loading branch information
fcarreiro authored Jul 10, 2024
1 parent ebec8ff commit 108fc5f
Show file tree
Hide file tree
Showing 3 changed files with 1,404 additions and 27 deletions.
5 changes: 2 additions & 3 deletions barretenberg/cpp/src/barretenberg/common/ref_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ template <typename T, std::size_t N> class RefArray {
RefArray() = default;
RefArray(const std::array<T*, N>& ptr_array)
{
std::size_t i = 0;
for (T& elem : ptr_array) {
storage[i++] = &elem;
for (std::size_t i = 0; i < N; ++i) {
storage[i++] = ptr_array[i];
}
}
template <typename... Ts> RefArray(T& ref, Ts&... rest)
Expand Down
Loading

0 comments on commit 108fc5f

Please sign in to comment.