chore: store last loads in HashSet instead of HashMap in mem2reg#9498
chore: store last loads in HashSet instead of HashMap in mem2reg#9498TomAFrench merged 4 commits intomasterfrom
HashSet instead of HashMap in mem2reg#9498Conversation
There was a problem hiding this comment.
ACVM Benchmarks
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
purely_sequential_opcodes |
267874 ns/iter (± 1643) |
249079 ns/iter (± 1444) |
1.08 |
perfectly_parallel_opcodes |
235580 ns/iter (± 3728) |
218237 ns/iter (± 3796) |
1.08 |
perfectly_parallel_batch_inversion_opcodes |
2813293 ns/iter (± 2483) |
2781122 ns/iter (± 6492) |
1.01 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Opcode count
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
private-kernel-inner |
14792 opcodes |
14792 opcodes |
1 |
private-kernel-reset |
68868 opcodes |
68868 opcodes |
1 |
private-kernel-tail |
11177 opcodes |
11177 opcodes |
1 |
rollup-base-private |
221323 opcodes |
221323 opcodes |
1 |
rollup-base-public |
159942 opcodes |
159942 opcodes |
1 |
rollup-block-root-empty |
68106 opcodes |
68106 opcodes |
1 |
rollup-block-root-single-tx |
963851 opcodes |
963851 opcodes |
1 |
rollup-block-root |
965137 opcodes |
965137 opcodes |
1 |
rollup-merge |
1409 opcodes |
1409 opcodes |
1 |
rollup-root |
2631 opcodes |
2631 opcodes |
1 |
semaphore-depth-10 |
5700 opcodes |
5700 opcodes |
1 |
sha512-100-bytes |
13173 opcodes |
13173 opcodes |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Artifact Size
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
private-kernel-inner |
709.1 KB |
709.1 KB |
1 |
private-kernel-reset |
2033.1 KB |
2033.1 KB |
1 |
private-kernel-tail |
535.9 KB |
535.9 KB |
1 |
rollup-base-private |
4317.7 KB |
4317.7 KB |
1 |
rollup-base-public |
3329.6 KB |
3329.6 KB |
1 |
rollup-block-root-empty |
3846.8 KB |
3846.8 KB |
1 |
rollup-block-root-single-tx |
30728.8 KB |
30728.8 KB |
1 |
rollup-block-root |
30774.4 KB |
30774.4 KB |
1 |
rollup-merge |
187 KB |
187 KB |
1 |
rollup-root |
388.9 KB |
388.9 KB |
1 |
semaphore-depth-10 |
631.5 KB |
631.5 KB |
1 |
sha512-100-bytes |
525.2 KB |
525.2 KB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Compilation Time
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
private-kernel-inner |
1.74 s |
1.8 s |
0.97 |
private-kernel-reset |
7.846 s |
7.678 s |
1.02 |
private-kernel-tail |
1.396 s |
1.3 s |
1.07 |
rollup-base-private |
15.58 s |
15.46 s |
1.01 |
rollup-base-public |
13.34 s |
13.62 s |
0.98 |
rollup-block-root-empty |
20.7 s |
22.8 s |
0.91 |
rollup-block-root-single-tx |
203 s |
204 s |
1.00 |
rollup-block-root |
204 s |
199 s |
1.03 |
rollup-merge |
1.484 s |
1.456 s |
1.02 |
rollup-root |
1.492 s |
1.47 s |
1.01 |
semaphore-depth-10 |
0.757 s |
0.793 s |
0.95 |
sha512-100-bytes |
1.701 s |
1.672 s |
1.02 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Execution Time
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
private-kernel-inner |
0.017 s |
0.019 s |
0.89 |
private-kernel-reset |
0.154 s |
0.154 s |
1 |
private-kernel-tail |
0.01 s |
0.01 s |
1 |
rollup-base-private |
0.264 s |
0.264 s |
1 |
rollup-base-public |
0.159 s |
0.166 s |
0.96 |
rollup-block-root |
13.3 s |
13.1 s |
1.02 |
rollup-merge |
0.002 s |
0.002 s |
1 |
rollup-root |
0.004 s |
0.004 s |
1 |
semaphore-depth-10 |
0.019 s |
0.02 s |
0.95 |
sha512-100-bytes |
0.109 s |
0.094 s |
1.16 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Test Suite Duration
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
test_report_AztecProtocol_aztec-packages_noir-projects_aztec-nr |
100 s |
97 s |
1.03 |
test_report_AztecProtocol_aztec-packages_noir-projects_noir-contracts |
109 s |
113 s |
0.96 |
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob |
195 s |
168 s |
1.16 |
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_private-kernel-lib |
215 s |
213 s |
1.01 |
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_reset-kernel-lib |
32 s |
32 s |
1 |
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_rollup-lib |
650 s |
659 s |
0.99 |
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_types |
100 s |
100 s |
1 |
test_report_noir-lang_noir-bignum_ |
379 s |
381 s |
0.99 |
test_report_noir-lang_noir_bigcurve_ |
305 s |
305 s |
1 |
test_report_noir-lang_sha256_ |
16 s |
14 s |
1.14 |
test_report_noir-lang_sha512_ |
14 s |
14 s |
1 |
test_report_zkpassport_noir-ecdsa_ |
2 s |
1 s |
2 |
test_report_zkpassport_noir_rsa_ |
1 s |
1 s |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
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: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir-ecdsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
There was a problem hiding this comment.
Execution Memory
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
private-kernel-inner |
206.74 MB |
206.74 MB |
1 |
private-kernel-reset |
243.56 MB |
243.56 MB |
1 |
private-kernel-tail |
195.97 MB |
195.97 MB |
1 |
rollup-base-private |
500.28 MB |
500.28 MB |
1 |
rollup-base-public |
432.92 MB |
432.92 MB |
1 |
rollup-block-root |
1500 MB |
1500 MB |
1 |
rollup-merge |
328.21 MB |
328.21 MB |
1 |
rollup-root |
330.57 MB |
330.57 MB |
1 |
semaphore_depth_10 |
69.52 MB |
69.52 MB |
1 |
sha512_100_bytes |
55.02 MB |
55.02 MB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Compilation Memory
Details
| Benchmark suite | Current: 70301bb | Previous: d31b724 | Ratio |
|---|---|---|---|
private-kernel-inner |
239.91 MB |
239.94 MB |
1.00 |
private-kernel-reset |
549.14 MB |
549.14 MB |
1 |
private-kernel-tail |
213.88 MB |
213.88 MB |
1 |
rollup-base-private |
1350 MB |
1350 MB |
1 |
rollup-base-public |
1420 MB |
1420 MB |
1 |
rollup-block-root-empty |
1090 MB |
1090 MB |
1 |
rollup-block-root-single-tx |
9550 MB |
9550 MB |
1 |
rollup-block-root |
9560 MB |
9560 MB |
1 |
rollup-merge |
330.58 MB |
330.58 MB |
1 |
rollup-root |
341.41 MB |
341.41 MB |
1 |
semaphore_depth_10 |
104.78 MB |
104.78 MB |
1 |
sha512_100_bytes |
234.81 MB |
234.73 MB |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: some mem2reg refactors regarding expressions and aliases (noir-lang/noir#9610) feat: keep last loads from predecessors in mem2reg (noir-lang/noir#9492) chore: Update flattening docs (noir-lang/noir#9588) chore: remove redundant globals creation (noir-lang/noir#9606) chore: simplify Expression in mem2reg (noir-lang/noir#9599) chore: remove duplicate `contains_reference` in mem2reg (noir-lang/noir#9602) chore!: remove `verify_signature_slice` methods from stdlib (noir-lang/noir#9597) fix(expand): correctly handle nested dereferences (noir-lang/noir#9598) fix(ssa): Do not simplify on lhs being zero for shifts (noir-lang/noir#9596) chore: store last loads in `HashSet` instead of `HashMap` in mem2reg (noir-lang/noir#9498) chore: `--no-ssa-locations` for `nargo interpret` and show negative values when printing SSA (noir-lang/noir#9586) fix: `assert_constant` refactors and fixes from audit (noir-lang/noir#9547) fix(ssa): Consider `shl` and `shr` to have side effects (noir-lang/noir#9580) fix: avoid invalid cast in `remove_bit_shifts` (noir-lang/noir#9570) fix(mem2reg): Consider aliases of a loaded address to be loaded from as well (noir-lang/noir#9567) fix: Consume correct number of fields when printing references (noir-lang/noir#9579) chore: Add a section for numeric type aliases (noir-lang/noir#9589) chore(remove_paired_rc): Add various unit tests (noir-lang/noir#9425) fix: incorrect max bit size in `remove_bit_shifts` (noir-lang/noir#9585) chore(ssa): Simplify shl/shr identity operations (noir-lang/noir#9587) chore: greenlight `brillig_array_get_and_set` for audits (noir-lang/noir#9540) chore(ssa): Update comments on `loop_invariant` for audit and some missing unit tests (noir-lang/noir#9574) chore: Switch to node v22.15.0 (noir-lang/noir#9582) chore: Update unrolling docs for audit (noir-lang/noir#9572) chore: greenlight `array_set_optimization` (noir-lang/noir#9560) fix(acir_gen): Keep range checks before side effects (noir-lang/noir#9340) END_COMMIT_OVERRIDE
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: some mem2reg refactors regarding expressions and aliases (noir-lang/noir#9610) feat: keep last loads from predecessors in mem2reg (noir-lang/noir#9492) chore: Update flattening docs (noir-lang/noir#9588) chore: remove redundant globals creation (noir-lang/noir#9606) chore: simplify Expression in mem2reg (noir-lang/noir#9599) chore: remove duplicate `contains_reference` in mem2reg (noir-lang/noir#9602) chore!: remove `verify_signature_slice` methods from stdlib (noir-lang/noir#9597) fix(expand): correctly handle nested dereferences (noir-lang/noir#9598) fix(ssa): Do not simplify on lhs being zero for shifts (noir-lang/noir#9596) chore: store last loads in `HashSet` instead of `HashMap` in mem2reg (noir-lang/noir#9498) chore: `--no-ssa-locations` for `nargo interpret` and show negative values when printing SSA (noir-lang/noir#9586) fix: `assert_constant` refactors and fixes from audit (noir-lang/noir#9547) fix(ssa): Consider `shl` and `shr` to have side effects (noir-lang/noir#9580) fix: avoid invalid cast in `remove_bit_shifts` (noir-lang/noir#9570) fix(mem2reg): Consider aliases of a loaded address to be loaded from as well (noir-lang/noir#9567) fix: Consume correct number of fields when printing references (noir-lang/noir#9579) chore: Add a section for numeric type aliases (noir-lang/noir#9589) chore(remove_paired_rc): Add various unit tests (noir-lang/noir#9425) fix: incorrect max bit size in `remove_bit_shifts` (noir-lang/noir#9585) chore(ssa): Simplify shl/shr identity operations (noir-lang/noir#9587) chore: greenlight `brillig_array_get_and_set` for audits (noir-lang/noir#9540) chore(ssa): Update comments on `loop_invariant` for audit and some missing unit tests (noir-lang/noir#9574) chore: Switch to node v22.15.0 (noir-lang/noir#9582) chore: Update unrolling docs for audit (noir-lang/noir#9572) chore: greenlight `array_set_optimization` (noir-lang/noir#9560) fix(acir_gen): Keep range checks before side effects (noir-lang/noir#9340) END_COMMIT_OVERRIDE
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: some mem2reg refactors regarding expressions and aliases (noir-lang/noir#9610) feat: keep last loads from predecessors in mem2reg (noir-lang/noir#9492) chore: Update flattening docs (noir-lang/noir#9588) chore: remove redundant globals creation (noir-lang/noir#9606) chore: simplify Expression in mem2reg (noir-lang/noir#9599) chore: remove duplicate `contains_reference` in mem2reg (noir-lang/noir#9602) chore!: remove `verify_signature_slice` methods from stdlib (noir-lang/noir#9597) fix(expand): correctly handle nested dereferences (noir-lang/noir#9598) fix(ssa): Do not simplify on lhs being zero for shifts (noir-lang/noir#9596) chore: store last loads in `HashSet` instead of `HashMap` in mem2reg (noir-lang/noir#9498) chore: `--no-ssa-locations` for `nargo interpret` and show negative values when printing SSA (noir-lang/noir#9586) fix: `assert_constant` refactors and fixes from audit (noir-lang/noir#9547) fix(ssa): Consider `shl` and `shr` to have side effects (noir-lang/noir#9580) fix: avoid invalid cast in `remove_bit_shifts` (noir-lang/noir#9570) fix(mem2reg): Consider aliases of a loaded address to be loaded from as well (noir-lang/noir#9567) fix: Consume correct number of fields when printing references (noir-lang/noir#9579) chore: Add a section for numeric type aliases (noir-lang/noir#9589) chore(remove_paired_rc): Add various unit tests (noir-lang/noir#9425) fix: incorrect max bit size in `remove_bit_shifts` (noir-lang/noir#9585) chore(ssa): Simplify shl/shr identity operations (noir-lang/noir#9587) chore: greenlight `brillig_array_get_and_set` for audits (noir-lang/noir#9540) chore(ssa): Update comments on `loop_invariant` for audit and some missing unit tests (noir-lang/noir#9574) chore: Switch to node v22.15.0 (noir-lang/noir#9582) chore: Update unrolling docs for audit (noir-lang/noir#9572) chore: greenlight `array_set_optimization` (noir-lang/noir#9560) fix(acir_gen): Keep range checks before side effects (noir-lang/noir#9340) END_COMMIT_OVERRIDE
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: some mem2reg refactors regarding expressions and aliases (noir-lang/noir#9610) feat: keep last loads from predecessors in mem2reg (noir-lang/noir#9492) chore: Update flattening docs (noir-lang/noir#9588) chore: remove redundant globals creation (noir-lang/noir#9606) chore: simplify Expression in mem2reg (noir-lang/noir#9599) chore: remove duplicate `contains_reference` in mem2reg (noir-lang/noir#9602) chore!: remove `verify_signature_slice` methods from stdlib (noir-lang/noir#9597) fix(expand): correctly handle nested dereferences (noir-lang/noir#9598) fix(ssa): Do not simplify on lhs being zero for shifts (noir-lang/noir#9596) chore: store last loads in `HashSet` instead of `HashMap` in mem2reg (noir-lang/noir#9498) chore: `--no-ssa-locations` for `nargo interpret` and show negative values when printing SSA (noir-lang/noir#9586) fix: `assert_constant` refactors and fixes from audit (noir-lang/noir#9547) fix(ssa): Consider `shl` and `shr` to have side effects (noir-lang/noir#9580) fix: avoid invalid cast in `remove_bit_shifts` (noir-lang/noir#9570) fix(mem2reg): Consider aliases of a loaded address to be loaded from as well (noir-lang/noir#9567) fix: Consume correct number of fields when printing references (noir-lang/noir#9579) chore: Add a section for numeric type aliases (noir-lang/noir#9589) chore(remove_paired_rc): Add various unit tests (noir-lang/noir#9425) fix: incorrect max bit size in `remove_bit_shifts` (noir-lang/noir#9585) chore(ssa): Simplify shl/shr identity operations (noir-lang/noir#9587) chore: greenlight `brillig_array_get_and_set` for audits (noir-lang/noir#9540) chore(ssa): Update comments on `loop_invariant` for audit and some missing unit tests (noir-lang/noir#9574) chore: Switch to node v22.15.0 (noir-lang/noir#9582) chore: Update unrolling docs for audit (noir-lang/noir#9572) chore: greenlight `array_set_optimization` (noir-lang/noir#9560) fix(acir_gen): Keep range checks before side effects (noir-lang/noir#9340) END_COMMIT_OVERRIDE
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: some mem2reg refactors regarding expressions and aliases (noir-lang/noir#9610) feat: keep last loads from predecessors in mem2reg (noir-lang/noir#9492) chore: Update flattening docs (noir-lang/noir#9588) chore: remove redundant globals creation (noir-lang/noir#9606) chore: simplify Expression in mem2reg (noir-lang/noir#9599) chore: remove duplicate `contains_reference` in mem2reg (noir-lang/noir#9602) chore!: remove `verify_signature_slice` methods from stdlib (noir-lang/noir#9597) fix(expand): correctly handle nested dereferences (noir-lang/noir#9598) fix(ssa): Do not simplify on lhs being zero for shifts (noir-lang/noir#9596) chore: store last loads in `HashSet` instead of `HashMap` in mem2reg (noir-lang/noir#9498) chore: `--no-ssa-locations` for `nargo interpret` and show negative values when printing SSA (noir-lang/noir#9586) fix: `assert_constant` refactors and fixes from audit (noir-lang/noir#9547) fix(ssa): Consider `shl` and `shr` to have side effects (noir-lang/noir#9580) fix: avoid invalid cast in `remove_bit_shifts` (noir-lang/noir#9570) fix(mem2reg): Consider aliases of a loaded address to be loaded from as well (noir-lang/noir#9567) fix: Consume correct number of fields when printing references (noir-lang/noir#9579) chore: Add a section for numeric type aliases (noir-lang/noir#9589) chore(remove_paired_rc): Add various unit tests (noir-lang/noir#9425) fix: incorrect max bit size in `remove_bit_shifts` (noir-lang/noir#9585) chore(ssa): Simplify shl/shr identity operations (noir-lang/noir#9587) chore: greenlight `brillig_array_get_and_set` for audits (noir-lang/noir#9540) chore(ssa): Update comments on `loop_invariant` for audit and some missing unit tests (noir-lang/noir#9574) chore: Switch to node v22.15.0 (noir-lang/noir#9582) chore: Update unrolling docs for audit (noir-lang/noir#9572) chore: greenlight `array_set_optimization` (noir-lang/noir#9560) fix(acir_gen): Keep range checks before side effects (noir-lang/noir#9340) END_COMMIT_OVERRIDE
Description
Problem*
Resolves
Summary*
This PR implements the first refactoring mentioned in #9393
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.