-
Notifications
You must be signed in to change notification settings - Fork 455
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
Simplify conditionals codegen + add missing side effects checks. #7151
Conversation
Fixes #7142 - x ? y : false --> x && y - x ? false : y --> !x && y - push negation inside when it leads to simplification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic!
There was a problem hiding this 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 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05
.
Benchmark suite | Current: 1a5f286 | Previous: e1b7fb7 | Ratio |
---|---|---|---|
Print RedBlackTreeNoComments.res - time/run |
2.228255373333333 ms |
2.10057036 ms |
1.06 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! 👍
Tested against a real-life project and looks good.
Fixes #7142
x ? y : false --> x && y
x ? false : y --> !x && y
push negation inside when it leads to simplification
fix some missing checks for side effects on optimisations