fix(ssa): Use the ValueMerger on the element instead of keeping ArraySet#11760
Conversation
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'ACVM Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 6e24b10 | Previous: f0e3a89 | Ratio |
|---|---|---|---|
perfectly_parallel_batch_inversion_opcodes |
2743946 ns/iter (± 1963) |
2207560 ns/iter (± 3190) |
1.24 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 2d26690 | Previous: 41caacb | Ratio |
|---|---|---|---|
rollup-block-root-single-tx |
0.003 s |
0.002 s |
1.50 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Brillig Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 6e24b10 | Previous: f0e3a89 | Ratio |
|---|---|---|---|
private-kernel-tail |
0.005 s |
0.004 s |
1.25 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 6e24b10 | Previous: f0e3a89 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir-ecdsa_ |
4 s |
2 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
…array-set-predicate-simplification
Changes to circuit sizes
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
Changes to Brillig bytecode sizes
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
Changes to number of Brillig opcodes executed
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
|
I don't know if those "+2" regressions are real. I just tried an alternative in #11773 and I also get those "+2" regressions, even though in that PR only ACIR functions are modified. |
I don't know either, I just tried the |
|
Looks suspiciously similar to the change from not having globals generated in brilliggen |
I thought so too, but I didn't get how that would be different between this branch and its target. Maybe it's measuring it against master somehow, but that's not what the commit said in the comment. |
c865890
into
tf/fix-array-set-predicate-simplification
Description
Problem
Follow up for #11659 (comment)
Summary
This is an enhancement for #11659 to prevent the opcode size regression on
aztec-packages.Changes the
opt::array_setpass so that instead of just keeping thearray_setinstruction when themake_arrayit could be folded into has a different predicate, it uses theValueMergerto update the item like so:This is what the ACIR gen of
array_setwould do, but by doing it in SSA, we can give further SSA simplifications a chance to reduce the final opcode count.Additional Context
With this change, the opcodes on
rollup_tx_base_publicgo from 314113 down to 263264, which is much closer to the original 254789, a 3% increase instead of 23%.User Documentation
Check one:
PR Checklist
cargo fmton default settings.