ocaml-multicore / kcas

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

Inline transaction log record and use polymorphic variant for mode #162

Closed polytypic closed 9 months ago

polytypic commented 9 months ago

This improves the internals by "inlining" the transaction log record, which eliminates an indirection and avoids a write barrier per transaction. This slightly reduces the overhead of transactions.

This PR also changes the optional mode argument to use a polymorphic variant, which makes the API slightly more convenient.