[PATCH] D10480: Implement shared_mutex re: N4508

2018-07-10 Thread Kenneth Camann via Phabricator via cfe-commits
kjcamann added a comment. I have recently benchmarked this (platform was RHEL 7 and Haswell), and the libc++ version has about twice the latency of a pthread_rwlock for both classes of locking. libc++ is also about twice the latency of the libstdc++ implementation, because it is just a lightwei

[PATCH] D10480: Implement shared_mutex re: N4508

2018-07-10 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. I missed this when it went in and coming across the code now I'm quite surprised that it did. Why is `shared_mutex` not implemented as a wrapper around rwlocks (pthreads and Windows both provide this abstraction)? The current implementation looks a lot less efficient