New Library included: SB-TRANSACTION

Posted on Updated on

Since version 1.3.3, STMX also includes SB-TRANSACTION, a standalone library that does not depend on STMX and provides hardware-only memory transactions on CPUs that support Intel TSX instructions. It is a low-level library providing raw access to the new CPU instructions for hardware transactions. Its performance reaches the theoretical peak supported by the underlying CPU, and it is obviously faster than STMX – it is usually even faster than hand-optimized compare-and-swap fine grained locking code (see benchmark results in doc/benchmark.md). The reason is that it avoids the overhead and the software compatibility requirements of STMX, providing only the raw features – and the limitations – of the underlying CPU. At the moment, SB-TRANSACTION only works on SBCL running in native 64-bit mode on a CPU with hardware transaction support (see the list above).

Leave a comment