Skip to content

feat: omit element size array for more array types#8257

Merged
TomAFrench merged 6 commits intomasterfrom
tf/omit-element-size-array-for-nested-arrays
Apr 29, 2025
Merged

feat: omit element size array for more array types#8257
TomAFrench merged 6 commits intomasterfrom
tf/omit-element-size-array-for-nested-arrays

Conversation

@TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Apr 28, 2025

Description

Problem*

Resolves

Summary*

We're currently using an element sizes array for arrays for which the element type isn't of size 1. This is overly strict as we only require that they're a consistent size so that we can multiply the index by a constant when flattening it.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench TomAFrench added the bench-show Display benchmark results on PR label Apr 28, 2025
@TomAFrench TomAFrench closed this Apr 28, 2025
@TomAFrench TomAFrench reopened this Apr 28, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACVM Benchmarks

Details
Benchmark suite Current: d36e18c Previous: c7e56be Ratio
purely_sequential_opcodes 264387 ns/iter (± 832) 272158 ns/iter (± 973) 0.97
perfectly_parallel_opcodes 246089 ns/iter (± 4726) 247605 ns/iter (± 466) 0.99
perfectly_parallel_batch_inversion_opcodes 3584383 ns/iter (± 6348) 3231499 ns/iter (± 2894) 1.11

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 28, 2025

Changes to circuit sizes

Generated at commit: 6ce93c7526f291c41a5de44cf680cdd6a93903d2, compared to commit: c7e56beaac4081c5b71c0717e122aaf9a7b075f2

🧾 Summary (10% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
regression_7612 -6 ✅ -30.00% -15 ✅ -0.54%
databus_composite_calldata -8 ✅ -5.23% -35 ✅ -1.11%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
nested_dyn_array_regression_5782 34 (-2) -5.56% 2,848 (-10) -0.35%
regression_7612 14 (-6) -30.00% 2,778 (-15) -0.54%
databus_composite_calldata 145 (-8) -5.23% 3,107 (-35) -1.11%

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Execution Time

Details
Benchmark suite Current: d36e18c Previous: c7e56be Ratio
private-kernel-inner 0.028 s 0.028 s 1
private-kernel-reset 0.162 s 0.161 s 1.01
private-kernel-tail 0.016 s 0.016 s 1
rollup-base-private 0.33 s 0.33 s 1
rollup-base-public 0.212 s 0.217 s 0.98
rollup-block-root 12.3 s 11.4 s 1.08
rollup-merge 0.004 s 0.004 s 1
rollup-root 0.013 s 0.013 s 1

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compilation Time

Details
Benchmark suite Current: d36e18c Previous: c7e56be Ratio
regression_4709 0.66 s 0.732 s 0.90
ram_blowup_regression 12.8 s 13.6 s 0.94
global_var_regression_entry_points 0.477 s 0.514 s 0.93
private-kernel-inner 2.22 s 2.352 s 0.94
private-kernel-reset 6.524 s 6.316 s 1.03
private-kernel-tail 1.104 s 1.102 s 1.00
rollup-base-private 17.24 s 17.4 s 0.99
rollup-base-public 13.04 s 13.76 s 0.95
rollup-block-root-empty 1.238 s 1.244 s 1.00
rollup-block-root-single-tx 123 s 123 s 1
rollup-block-root 122 s 127 s 0.96
rollup-merge 1.044 s 1.07 s 0.98
rollup-root 1.638 s 1.616 s 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Suite Duration

Details
Benchmark suite Current: d36e18c Previous: c7e56be Ratio
test_report_AztecProtocol_aztec-packages_noir-projects_aztec-nr 54 s 52 s 1.04
test_report_AztecProtocol_aztec-packages_noir-projects_noir-contracts 89 s 95 s 0.94
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_blob 44 s 41 s 1.07
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_private-kernel-lib 176 s 172 s 1.02
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_rollup-lib 173 s 178 s 0.97
test_report_AztecProtocol_aztec-packages_noir-projects_noir-protocol-circuits_crates_types 53 s 54 s 0.98
test_report_noir-lang_noir-bignum_ 400 s 410 s 0.98
test_report_noir-lang_noir_bigcurve_ 223 s 247 s 0.90
test_report_noir-lang_sha512_ 28 s 26 s 1.08

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Execution Memory

Details
Benchmark suite Current: d36e18c Previous: c7e56be Ratio
private-kernel-inner 231.63 MB 231.63 MB 1
private-kernel-reset 255.24 MB 255.24 MB 1
private-kernel-tail 209.65 MB 209.65 MB 1
rollup-base-private 540.14 MB 540.14 MB 1
rollup-base-public 532.31 MB 532.32 MB 1.00
rollup-block-root 1440 MB 1440 MB 1
rollup-merge 361.22 MB 361.22 MB 1
rollup-root 367.14 MB 367.16 MB 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compilation Memory

Details
Benchmark suite Current: d36e18c Previous: c7e56be Ratio
private-kernel-inner 296.4 MB 296.36 MB 1.00
private-kernel-reset 563.5 MB 563.5 MB 1
private-kernel-tail 225.78 MB 225.74 MB 1.00
rollup-base-private 1440 MB 1440 MB 1
rollup-base-public 1460 MB 1460 MB 1
rollup-block-root-empty 393.5 MB 393.51 MB 1.00
rollup-block-root-single-tx 7880 MB 7880 MB 1
rollup-block-root 7890 MB 7890 MB 1
rollup-merge 375.57 MB 375.57 MB 1
rollup-root 436.47 MB 436.49 MB 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Base automatically changed from tf/simplify-array-reading to master April 29, 2025 16:43
@TomAFrench TomAFrench marked this pull request as ready for review April 29, 2025 16:52
@TomAFrench TomAFrench requested a review from a team April 29, 2025 16:52
@TomAFrench TomAFrench enabled auto-merge April 29, 2025 17:06
@TomAFrench TomAFrench added this pull request to the merge queue Apr 29, 2025
Merged via the queue into master with commit b101f73 Apr 29, 2025
114 checks passed
@TomAFrench TomAFrench deleted the tf/omit-element-size-array-for-nested-arrays branch April 29, 2025 18:34
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request May 1, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
feat: add `--debug-compile-stdin` to read `main.nr` from `STDIN` for
testing (noir-lang/noir#8253)
feat: better error message on unicode whitespace that isn't ascii
whitespace (noir-lang/noir#8295)
chore: update `quicksort` from iterative `noir_sort` version
(noir-lang/noir#7348)
fix: use correct meta attribute names in contract custom attributes
(noir-lang/noir#8273)
feat: `nargo expand` to show code after macro expansions
(noir-lang/noir#7613)
feat: allow specifying fuzz-related dirs when invoking `nargo test`
(noir-lang/noir#8293)
chore: redo typo PR by ciaranightingale
(noir-lang/noir#8292)
chore: Extend the bug list with issues found by the AST fuzzer
(noir-lang/noir#8285)
fix: don't disallow writing to memory after passing it to brillig
(noir-lang/noir#8276)
chore: test against zkpassport rsa lib
(noir-lang/noir#8278)
feat: omit element size array for more array types
(noir-lang/noir#8257)
chore: refactor array handling in ACIRgen
(noir-lang/noir#8256)
chore: document cast (noir-lang/noir#8268)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bench-show Display benchmark results on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants