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: Remove Type from Value, and remove ctrl_typevars #6771

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Dec 11, 2024

Description

Problem*

Summary*

Another step towards removing ValueId.

Removes Type from the Value enum to make Values copyable by moving types to be stored in Instructions when they weren't before. This means every instruction knows its result type(s) and ctrl_typevars are never needed

Unlike #6769, this PR is a draft because I need to check performance - without the larger change to use a Value enum instead of ValueIds, this PR may result in worse performance alone.

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 Dec 11, 2024

Changes to Brillig bytecode sizes

Generated at commit: 0b564760891e7dc8d547d919f14d3415057ee92e, compared to commit: f6957faf50025afc053a32d86398d0823253066b

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
to_le_bytes +4 ❌ +2.99%

Full diff report 👇
Program Brillig opcodes (+/-) %
to_le_bytes 138 (+4) +2.99%

Copy link
Contributor

github-actions bot commented Dec 11, 2024

Peak Memory Sample

Program Peak Memory %
keccak256 78.39M 0%
workspace 121.67M 0%
regression_4709 305.28M 3%
ram_blowup_regression 2.44G 0%
private-kernel-tail 209.24M 0%
private-kernel-reset 861.86M 0%
private-kernel-inner 307.71M 0%
parity-root 174.80M 0%

Copy link
Contributor

github-actions bot commented Dec 11, 2024

Compilation Sample

Program Compilation Time %
sha256_regression 0m1.563s 9%
regression_4709 0m1.478s -3%
ram_blowup_regression 0m17.829s 7%
private-kernel-tail 0m1.526s 21%
private-kernel-reset 0m9.419s 9%
private-kernel-inner 0m2.373s 0%
parity-root 0m0.922s -12%
noir-contracts 2m36.715s -6%

Base automatically changed from jf/numeric-type to master December 11, 2024 17:47
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