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

IsData: generate strict let-bindings #4822

Merged
merged 2 commits into from
Aug 30, 2022
Merged

Conversation

michaelpj
Copy link
Contributor

This makes a few generated let-bindings strict. This has two effects:

  1. We don't recompute the value if we use it multiple times in the body.
  2. We are less likely to move the binding around or inline it because we can't tell if it's pure.

The latter is mildly worse, the former is moderately better. I wrote a budget test and it gets better after this commit, so it seems worth it.

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
    • Formatting, PNG optimization, etc. are updated
  • PR
    • (For external contributions) Corresponding issue exists and is linked in the description
    • Targeting master unless this is a cherry-pick backport
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

This is going to be more efficient since it won't redo work.
It may make us slightly less inclined to inline things since we don't
know that the RHSs are pure generally, but that's probably okay.
@michaelpj michaelpj merged commit 26c1ac8 into master Aug 30, 2022
@kwxm kwxm deleted the mpj/strict-bindings-from-data branch November 10, 2022 13:32
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