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

fix: Experiment with DecrementRc #7629

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

fix: Experiment with DecrementRc #7629

wants to merge 7 commits into from

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Mar 7, 2025

Description

Problem*

Resolves

Summary*

This is an experimental branch where I'm hoping to fix the underlying issues with our usage of dec_rc. Currently this PR:

  • Reverts dec_rc value original_value back to a single valued dec_rc value
  • Changes dec_rc on parameters to always be issued on the original load value rather than creating a new load. This should fix the original underflow issue we changed dec_rc for.
  • Splits the reference_counts into a separate test for each inliner setting: min, 0, and max. The inliner 0 setting was actually seeing different optimization characteristics compared to the other two just due to optimization ordering. The behavior is still correct though.
  • Changes the "assert if rc drops below 1" debug setting to "assert if rc drops below 0" since an rc of zero is a valid state - it indicates an array that should no longer be used.

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 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.

⚠️ 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: 19c19c0 Previous: e3f8398 Ratio
AztecProtocol_aztec-packages_noir-projects_noir-contracts 99 s 77 s 1.29

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

CC: @TomAFrench

@jfecher jfecher marked this pull request as ready for review March 7, 2025 20:38
@jfecher jfecher requested a review from a team March 7, 2025 20:39
@jfecher
Copy link
Contributor Author

jfecher commented Mar 7, 2025

Opening this to review because I think this solves the original issue which #7297 patched. As far as I can see performance with this PR is similar to before it, although ref counts are slightly different depending on inliner settings.

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.

1 participant