r/cpp • • Jul 15 '26

Understanding std::shared_mutex from C++17

https://www.cppstories.com/2026/shared_mutex/
65 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/IGarFieldI Jul 17 '26

I just replaced a mutex with a shared_mutex and read/read-write locks for our translation cache. The benchmarked scenario had about 5 million lookups vs. 35k inserts. The read/read-write implementation won by a landslide.