Remove unnecessary no_ov arguments from IntDomTuple#2020
Open
Remove unnecessary no_ov arguments from IntDomTuple#2020
no_ov arguments from IntDomTuple#2020Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes IntDomTuple option-combining helpers by removing the custom opt_map2 (which relied on curry/uncurry) and switching to the direct GobOption.map2 implementation, while also simplifying several polymorphic record function types by dropping the unused ?no_ov optional argument.
Changes:
- Removed
opt_map2and replaced its usages withGobOption.map2in tuple-wise mapping/projection helpers. - Simplified internal polymorphic function record types (
poly2_pr,poly1,poly2) by removing the unused?no_ovparameter. - Adjusted call sites accordingly (e.g.,
leq,join/meet/widen/narrow, comparisons, and overflow-checkingmap2ovc).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
They don't currently use it though.
michael-schwarz
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From rsync profiling I noticed some time being spent on currying and uncurrying in
IntDomTuple.opt_map2.It may have been a convenient way to write that function but this back and forth is unnecessary and allocates a bunch of closures each time.
This PR replaces it with the existing
GobOption.map2which is implemented directly.The only difference with
opt_map2was that it had the optionalno_ovargument. But turns out this is almost always unused and can easily be worked around in the single use case.I doubt this will make a significant difference for rsync though but I can try.
TODO