ocaml-multicore / kcas

Software Transactional Memory for OCaml
https://ocaml-multicore.github.io/kcas/
ISC License
109 stars 11 forks source link

Optimize to use a single counter to keep track of when to validate #89

Closed polytypic closed 1 year ago

polytypic commented 1 year ago

Validation is triggered whenever counter reaches next power of two which can be detected when previous and new counter values have no bits set in common. This reduces the size of the transaction log record by one word.