JDevlieghere wrote: Can we use llvm's `RWMutex` instead of `shared_mutex`. On macOS this uses `pthread_rwlock` which is a lot faster than the implementation in the stdlib (https://github.com/llvm/llvm-project/pull/70151). https://github.com/llvm/llvm-project/pull/71932