-
Notifications
You must be signed in to change notification settings - Fork 13
Optimizations #46
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
Merged
Merged
Optimizations #46
Conversation
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
8fa9fb1 to
ba4015e
Compare
ec267f5 to
44d6610
Compare
44d6610 to
3b579ed
Compare
Collaborator
Author
|
In the benchmarks below, |
Merged
b15a7d1 to
633bd32
Compare
Merged
8554b4e to
d7a18fc
Compare
In case only CMP operations are performed, it is not necessary to perform an additional verify step as all the locations have already been (read once and) verified by the determine phase.
d7a18fc to
c695e83
Compare
c695e83 to
92daa44
Compare
92daa44 to
5a9792e
Compare
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 PR introduces a number of internal optimizations.
In case only CMP operations are performed, it is not necessary to perform an additional
verifystep as all the locations have already been (read once and) verified by thedeterminephase. The determine phase now keeps track of whether there were CAS and/or CMP operations and then a verify is skipped if there weren't both.fenceless_getandfenceless_setoperations are used internally in places where it is safe to do, because the fences are redundant as there are other fenceful operations accessing the same words.A level of indirection is eliminated by using an unsafe cast. This also reduces the size of a location by two words.
The last two optimizations use "unsafe" features of OCaml. I implemented them in such a way that they are easy to revert simply by adjusting comment blocks in the code.