Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move constant creation out of loop #6836

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Resolves

Summary*

Very minor optimization I noticed while doing something else.

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 requested a review from a team December 17, 2024 12:22
@TomAFrench TomAFrench changed the title chore:: move constant creation out of loop chore: move constant creation out of loop Dec 17, 2024
Copy link
Contributor

Changes to Brillig bytecode sizes

Generated at commit: 7bbc9f7d091b30a5cef8776e248f47326fb2e141, compared to commit: f037c36f6bfcb8efb1950e444b50bc3eff28ffc4

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 +3 ❌ +0.07%

Full diff report 👇
Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 4,254 (+3) +0.07%

Copy link
Contributor

Changes to number of Brillig opcodes executed

Generated at commit: 7bbc9f7d091b30a5cef8776e248f47326fb2e141, compared to commit: f037c36f6bfcb8efb1950e444b50bc3eff28ffc4

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 -3 ✅ -0.00%
sha256_regression -3 ✅ -0.00%

Full diff report 👇
Program Brillig opcodes (+/-) %
poseidonsponge_x5_254 183,750 (-3) -0.00%
sha256_regression 118,704 (-3) -0.00%

Copy link
Contributor

Peak Memory Sample

Program Peak Memory
keccak256 78.15M
workspace 122.66M
regression_4709 423.26M
ram_blowup_regression 1.58G
private-kernel-tail 206.67M
private-kernel-reset 720.25M
private-kernel-inner 291.85M
parity-root 171.68M

Copy link
Contributor

Compilation Sample

Program Compilation Time %
sha256_regression 0m1.390s 2%
regression_4709 0m0.790s -3%
ram_blowup_regression 0m14.370s 0%
rollup-base-public 3m15.707s -7%
rollup-base-private 3m1.718s -2%
private-kernel-tail 0m1.308s 6%
private-kernel-reset 0m8.297s 3%
private-kernel-inner 0m2.473s 1%
parity-root 0m0.898s -8%
noir-contracts 2m57.339s 0%

@TomAFrench TomAFrench added this pull request to the merge queue Dec 17, 2024
Merged via the queue into master with commit e341a3b Dec 17, 2024
66 checks passed
@TomAFrench TomAFrench deleted the tf/hoist-constant-creation-out-of-loop branch December 17, 2024 13:20
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Dec 18, 2024
…r#6810)

chore: move constant creation out of loop (noir-lang/noir#6836)
fix: implement `as_field` and `from_field` in the interpreter (noir-lang/noir#6829)
chore: Use Vec for callstacks (noir-lang/noir#6821)
feat: replace `eval_global_as_array_length` with type/interpreter evaluation (noir-lang/noir#6469)
chore: refactor `DataFlowGraph.insert_instruction_and_results` (noir-lang/noir#6823)
chore(docs): updating noirjs tutorial for 1.0.0 (noir-lang/noir#6792)
feat: Sync from aztec-packages (noir-lang/noir#6824)
chore: Have rust-analyzer use the stable toolchain (noir-lang/noir#6825)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Dec 18, 2024
chore: move constant creation out of loop (noir-lang/noir#6836)
fix: implement `as_field` and `from_field` in the interpreter (noir-lang/noir#6829)
chore: Use Vec for callstacks (noir-lang/noir#6821)
feat: replace `eval_global_as_array_length` with type/interpreter evaluation (noir-lang/noir#6469)
chore: refactor `DataFlowGraph.insert_instruction_and_results` (noir-lang/noir#6823)
chore(docs): updating noirjs tutorial for 1.0.0 (noir-lang/noir#6792)
feat: Sync from aztec-packages (noir-lang/noir#6824)
chore: Have rust-analyzer use the stable toolchain (noir-lang/noir#6825)
TomAFrench added a commit that referenced this pull request Dec 18, 2024
* master:
  fix: detect cycles in globals (#6859)
  chore(ci): Execution time report (#6827)
  chore(ci): Add non determinism check and fixes (#6847)
  chore(docs): updating the solidity contract how-to guide (#6804)
  fix: double alias in path (#6855)
  feat: configurable external check failures (#6810)
  chore: move constant creation out of loop (#6836)
  fix: implement `as_field` and `from_field` in the interpreter (#6829)
  chore: Use Vec for callstacks (#6821)
  feat: replace `eval_global_as_array_length` with type/interpreter evaluation (#6469)
  chore: refactor `DataFlowGraph.insert_instruction_and_results` (#6823)
  chore(docs): updating noirjs tutorial for 1.0.0 (#6792)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants