Benchmarking Reader-Writer Lock Performance

1 · Kyle Dotterrer · Jan. 18, 2021, midnight
This post presents benchmark results for two popular reader-writer lock implementations, and offers some (tentative) explanations for the patterns we observe. Motivation: Why Benchmark Reader-Writer Locks? A project with which I am involved currently uses tbb::reader_writer_lock from Intel’s Threading Building Blocks (TBB) library to back its internal “shared lock” implementation. However, the TBB library recently (as of this posting) deprecated its tbb::reader_writer_lock type, and now suggests...