Skip to content
Commit 088e37c7 authored by Howard Hinnant's avatar Howard Hinnant
Browse files

Despite my pathological distrust of spin locks, the number just don't lie. ...

Despite my pathological distrust of spin locks, the number just don't lie.  I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well.  In my experience, putting in a yield for every failed iteration is also a major performance booster.  This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster.

llvm-svn: 160967
parent ebcd1c7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment