Conversation
Contributor
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: b3e4166 | Previous: d94400f | Ratio |
|---|---|---|---|
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob |
238 s |
177 s |
1.34 |
test_report_zkpassport_noir-ecdsa_ |
3 s |
2 s |
1.50 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
vezenovm
reviewed
Aug 27, 2025
github-merge-queue bot
pushed a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Aug 28, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: make Ord for slices lexicographic (elements first, then length) (noir-lang/noir#9555) chore(ssa): Refactor `unrolling` (noir-lang/noir#9653) chore(docs): Update dependency page's examples (noir-lang/noir#9634) fix(ssa): Constant fold Brillig calls using the SSA interpreter (noir-lang/noir#9655) chore: LICM refactors (noir-lang/noir#9642) chore: add test for trait bound on implementing type (noir-lang/noir#9652) chore: pass `DataFlowGraph` instead of `Function` as arg (noir-lang/noir#9656) feat: Group one audit tests (noir-lang/noir#9445) fix(expand): better handling of dereferences (again) (noir-lang/noir#9654) feat(mem2reg): address last known value is independent of its aliases (take three) (noir-lang/noir#9633) chore: remove handling for slice arguments to MSM (noir-lang/noir#9648) fix: validate binary operations which do not allow fields (noir-lang/noir#9649) END_COMMIT_OVERRIDE
github-merge-queue bot
pushed a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Aug 28, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: make Ord for slices lexicographic (elements first, then length) (noir-lang/noir#9555) chore(ssa): Refactor `unrolling` (noir-lang/noir#9653) chore(docs): Update dependency page's examples (noir-lang/noir#9634) fix(ssa): Constant fold Brillig calls using the SSA interpreter (noir-lang/noir#9655) chore: LICM refactors (noir-lang/noir#9642) chore: add test for trait bound on implementing type (noir-lang/noir#9652) chore: pass `DataFlowGraph` instead of `Function` as arg (noir-lang/noir#9656) feat: Group one audit tests (noir-lang/noir#9445) fix(expand): better handling of dereferences (again) (noir-lang/noir#9654) feat(mem2reg): address last known value is independent of its aliases (take three) (noir-lang/noir#9633) chore: remove handling for slice arguments to MSM (noir-lang/noir#9648) fix: validate binary operations which do not allow fields (noir-lang/noir#9649) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem*
Some refactoring opportunities I saw to make the code easier to audit.
Summary*
A few changes to
unrollingthat shouldn't alter its behaviour, but hopefully make the code cleaner:inc_rcanddec_rcfrom ACIR functions: these have nothing to do with unrolling (we only count instructions for Brillig to see if a loop is small), and when we insert instructions into the block we unroll into, the simplification inevitably callsis_handled_by_runtime, which returnsfalsefor these, thus they will not be inserted anyway.std::collections::HashSetfromim::HashSetas we don't need deterministic data structures for unrolling, and hopefully O(1) is faster than O(log(n)).unroll_loop_block_helper: it was only called fromunroll_loop_blockand didn't seem to increase clarity.unroll_each: previously whenLoops::unroll_eachencountered a nested loop, it stopped consumingyet_to_unroll, created a newLoops, made a recursive call to itself, then merged the results. We would probably not have loops nested deep enough to cause a stack overflow, however:loopconstruct with a succession ofcontinueconditions.yet_to_unroll, so all the unrelated "sibling" loops we discovered infind_allwere wasted. Now we finish going through them before refreshing the context.failed_to_unrollto the nextLoopsto avoid redoing them again.failed_to_unrollandmodified_blocksfields fromLoopsinto theunroll_eachmethod:Loopsare used from multiple modules now (e.g. LICM), and these were only relevant to unrolling. As mentioned they also required passing from one context to the next. By keeping them local there is less reasoning to be done about their scope.Loops::unroll_eachand moved all functionality intoFunction::try_unroll_loops. The latter only forwarded to the former, and now that it's no longer recursive, I think it's cleaner to keep all unrolling in there, rather thanLoops, because during the iteration we do callLoops::find_allto refresh the context, which makes it look a bit odd to call it onself.Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.