The type inference algorithm seems to have been simplified,
meaning that the combination of T::from(x.into()) doesn't work anymore.
In any case, the code was also incomprehensible to a human, as it's not clear
by which "route" it does the transformation. It took me a few minutes to
figure out it's a `u64`.
These have been replaced by operations on either `poly::Ast` nodes, or
operations directly on chunks of polynomials within a higher-level
parallelism context.
Addition and scalar multiplication are (currently) still used in various
areas of the prover, so those are left in place.
This saves a bunch of `Clone`s and `Drop`s, which were consuming
significant amounts of time in large circuits (Orchard), which meant we
didn't save as much time as we could :)
This currently matches the first region on the row that matches any
input column, which will result in some mismatches. To fix this, we will
need to track the columns of complex selectors.
If the rational would evaluate to zero, we need to ignore it instead of
using its denominator in normal rational addition equations. This fixes
the tests we added in the last two commits.
The tests for addition and subtraction expose a bug in the addition
implementation, which does not correctly handle the `1/0 -> 0` map that
`inv0` is defined to perform.
The benchmark action's "cargo" tooling assumes the standard bencher
output format, and can't parse criterion's output. Fortunately,
criterion can also provide bencher output for compatibility.
In order to pass criterion flags via `cargo bench`, we need to ensure
that all benchmarks use it (otherwise the flags are rejected by the
built-in benchmark harness as unknown). Since we don't actually have any
benchmarks inside the library itself, we simply disable its benchmark
harness.
- Added keygen benchmark.
- Refactored to extract common prover and verifier logic.
- Benchmarks are now grouped.
- Prover (and keygen) benchmarks now only take 10 samples instead of 100
(to make them feasible to collect in CI).
The workflow will comment on commits that cause a performance regression
of at least 200% (e.g. proving taking twice as long); we'll tune this as
we figure out how well benchmarking works on standard GitHub builders.
zcash/halo2#337 had been updated to account for `AssignedCell`, before
the change to simplify its bounds was made. `AssignedCell` now requires
the `From` impls to take `&VR`.