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

Optimize arithmetic comparisons #2440

Closed
lukaszcz opened this issue Oct 10, 2023 · 0 comments · Fixed by #2443
Closed

Optimize arithmetic comparisons #2440

lukaszcz opened this issue Oct 10, 2023 · 0 comments · Fixed by #2443
Assignees
Milestone

Comments

@lukaszcz
Copy link
Collaborator

lukaszcz commented Oct 10, 2023

After merging

numeric comparisons have become inefficient even with optimization, because they now go through Ord.cmp.

We're left with terms like

case if = high n then EQ else if < high n then LT else GT of {
            LT := true;
            EQ := false;
            GT := false
          }

We should optimize the above to high < n.

@lukaszcz lukaszcz added this to the 0.5.3 milestone Oct 10, 2023
@lukaszcz lukaszcz self-assigned this Oct 10, 2023
lukaszcz added a commit that referenced this issue Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant