ocaml-multicore / kcas

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

Use GADT to avoid closures #186

Closed polytypic closed 7 months ago

polytypic commented 8 months ago

This changes the internal update operation to use a GADT to indicate which kind of operation to perform. This helps to avoid allocations for certain operations. The inline attribute is also removed from the internal update function. This reduces code size significantly. The periodic validation is also restricted to happen only on accesses of locations that have been accessed previously.