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

Simplify calls to caml_int_compare (and similar functions) (was #1809) #12181

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

smuenzel
Copy link
Contributor

Rebase #1809 to account for the new comparison primitive.

Also change the tests to force generation of assembly, so we can compare the output (which I did for amd64, and the simplification indeed works).

FYI @xclerc, @lthls

@smuenzel smuenzel changed the title Rebase 1809: Simplify calls to caml_int_compare (and similar functions) Simplify calls to caml_int_compare (and similar functions) (was #1809) Apr 13, 2023
@smuenzel smuenzel force-pushed the optim-comparison branch 3 times, most recently from f7beba2 to f87b07a Compare October 21, 2023 06:19
@smuenzel
Copy link
Contributor Author

Does anyone have thoughts on this PR? A review was already done in #1809

@gasche
Copy link
Member

gasche commented Oct 21, 2023

@lthls could you by chance do another round of review on this?

Copy link
Contributor

@lthls lthls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks fine. In the Flambda 2 version that I implemented recently, I also handle 0 op compare x y; I don't know how relevant it is in practice, so I'm fine with keeping the PR as it is.

@gasche gasche merged commit a0bbd7c into ocaml:trunk Oct 23, 2023
9 checks passed
@smuenzel
Copy link
Contributor Author

Thanks @lthls. I will follow up later and check if the case with zero first occurs in the wild and submit a follow-up PR if it does.

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.

None yet

4 participants