Avoid Addr argument to caml_send* (take 2)#10499
Closed
xavierleroy wants to merge 1 commit intoocaml:trunkfrom
Closed
Avoid Addr argument to caml_send* (take 2)#10499xavierleroy wants to merge 1 commit intoocaml:trunkfrom
xavierleroy wants to merge 1 commit intoocaml:trunkfrom
Conversation
Instead of passing a single "cache" argument that is a derived pointer, pass a a base array and an integer offset.
This was referenced Jul 9, 2021
Merged
garrigue
approved these changes
Jul 12, 2021
Contributor
garrigue
left a comment
There was a problem hiding this comment.
This is clearly fine semantically.
I don't know much about the performance implications: compared to take 1, it replaces manually computing a pointer by a call to int_array_ref. Is the latter consistently as efficient? Or maybe even more efficient, if optimized?
Contributor
Author
|
I merged #10498 (an alternate solution to the same problem) instead. I'll keep this one open for a while. |
Contributor
Author
|
There's no compelling reason to merge this PR soon, given that #10498 does the job, so I'll just close the PR. |
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.
This is another follow-up to #10461.
As in @lthls 's original proposal,
caml_send*no longer take a single "cache" argument that is a derived pointer, but they take a base array and an integer offset.What is new here is that we avoid keeping a derived pointer live altogether, since this interacts badly with the polling point that is automatically inserted in
caml_send.