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

feat: swap endianness in-place in keccak implementation #6128

Merged
merged 6 commits into from
Sep 23, 2024

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Resolves

Summary*

This PR removes the temp array created when swapping the endianness of the block_bytes array and just swaps the values in place. This removes some unnecessary reads/writes from brillig.

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.

Copy link
Contributor

github-actions bot commented Sep 23, 2024

Changes to Brillig bytecode sizes

Generated at commit: 8e28958f5aa6214b29fc61010e796fe3b6dc414e, compared to commit: 5bf7352ce4bb384dcb32f478743708914794773a

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
brillig_keccak -515 ✅ -18.57%
keccak256 -515 ✅ -18.57%

Full diff report 👇
Program Brillig opcodes (+/-) %
brillig_keccak 2,259 (-515) -18.57%
keccak256 2,259 (-515) -18.57%

@TomAFrench TomAFrench requested a review from a team September 23, 2024 17:37
@TomAFrench TomAFrench added this pull request to the merge queue Sep 23, 2024
Merged via the queue into master with commit e3cdebe Sep 23, 2024
46 checks passed
@TomAFrench TomAFrench deleted the tf/avoid-temporary-array-in-keccak branch September 23, 2024 19:33
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 23, 2024
…oir-lang/noir#6128)

feat: (LSP) remove unused imports (noir-lang/noir#6129)
fix: handle parenthesized expressions in array length (noir-lang/noir#6132)
chore: remove bubble_up_constrains (noir-lang/noir#6127)
fix: Consider constants as used values to keep their rc ops (noir-lang/noir#6122)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 23, 2024
…ir#6128)

feat: (LSP) remove unused imports (noir-lang/noir#6129)
fix: handle parenthesized expressions in array length (noir-lang/noir#6132)
chore: remove bubble_up_constrains (noir-lang/noir#6127)
fix: Consider constants as used values to keep their rc ops (noir-lang/noir#6122)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 23, 2024
…oir-lang/noir#6128)

feat: (LSP) remove unused imports (noir-lang/noir#6129)
fix: handle parenthesized expressions in array length (noir-lang/noir#6132)
chore: remove bubble_up_constrains (noir-lang/noir#6127)
fix: Consider constants as used values to keep their rc ops (noir-lang/noir#6122)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 23, 2024
…ir#6128)

feat: (LSP) remove unused imports (noir-lang/noir#6129)
fix: handle parenthesized expressions in array length (noir-lang/noir#6132)
chore: remove bubble_up_constrains (noir-lang/noir#6127)
fix: Consider constants as used values to keep their rc ops (noir-lang/noir#6122)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 24, 2024
…oir-lang/noir#6128)

feat: (LSP) remove unused imports (noir-lang/noir#6129)
fix: handle parenthesized expressions in array length (noir-lang/noir#6132)
chore: remove bubble_up_constrains (noir-lang/noir#6127)
fix: Consider constants as used values to keep their rc ops (noir-lang/noir#6122)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Sep 24, 2024
…ir#6128)

feat: (LSP) remove unused imports (noir-lang/noir#6129)
fix: handle parenthesized expressions in array length (noir-lang/noir#6132)
chore: remove bubble_up_constrains (noir-lang/noir#6127)
fix: Consider constants as used values to keep their rc ops (noir-lang/noir#6122)
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.

3 participants