-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove offset if its zero #3102
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3102 +/- ##
==========================================
+ Coverage 85.93% 85.95% +0.01%
==========================================
Files 289 290 +1
Lines 52101 52270 +169
==========================================
+ Hits 44774 44927 +153
- Misses 7327 7343 +16
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
f660acb
to
d5e6f70
Compare
LGTM @turbo1912. Could you update the rustdoc at the top of the file now that this optimizes both limits and offsets? I think it makes sense for these related optimizations to be in the same rule. |
Nice -- thanks @turbo1912 ! |
Benchmark runs are scheduled for baseline = 9956f80 and contender = dbfb0e6. dbfb0e6 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
* Remove offset if its zero * Add rust doc
* Remove offset if its zero * Add rust doc
* Remove offset if its zero * Add rust doc
Which issue does this PR close?
Closes #2584
Rationale for this change
If offset is 0, it should be a no-op and can be optimized out.
Questions to the reviewer?
Current proposed change adds this optimization to an existing slightly related optimizer. Does this require its own optimizer independent from eliminate_limit?