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 proposes to remove the
Op
or the low level multi-word compare-and-set (MCAS) API.Why remove it?
It is typically much harder to program with the lower level MCAS API, because it basically requires you to manually
which are all taken care of for you when using the transactional API.
The
Xt
API also offers further conveniences and fundamental abilities like composability, nesting, blocking, and timeouts that are not supported by theOp
API.Having the
Op
API is probably an unnecessary distraction for most potential users.Also, it is relatively easy to implement an
Op
like API using theXt
API:The overhead of the above is slightly higher than that of the direct
Op
implementation.Note that above is different from the existing
Op
API, because the above allows multiple ops to update the same location, which is not allowed by theOp
API. The behavior to reject such overlapping ops could be implemented usingXt.is_in_log
at the cost of some additional overhead (which could also beassert
s).OTOH, the above kind of approach also opens the possibility of using some more advanced data structures to represent the
ops
instead of as just lists, which could allow more flexible and efficient composition of (such intermediate) ops.It will likely also be possible to specialize the implementation better for transactions. Currently both the
Op
API and theXt
API share some implementation. After removing theOp
API it might be possible to specialize the internal implementation for theXt
API and reduce overheads a little bit.