2 pointsby vivekbhadra3 days ago1 comment
  • vivekbhadra3 days ago
    In this post I have examined the performance trade-offs between std::mutex and std::shared_mutex in read-heavy C++ workloads. For benchmarking I have used Google Benchmark framework. Based on a reader writer access pattern, it measures execution time per operation as reader concurrency increases. The results show lower overhead for std::mutex at low thread counts, followed by a clear crossover point where std::shared_mutex scales more effectively under increasing read contention.