|
|
|
|
|
by dcolkitt
2363 days ago
|
|
> Second, the uncontended case looks like
> Parking_lot::Mutex avg 6ms min 4ms max 9ms This estimate is way too high for the uncontested mutex case. On a modern Linux/Xeon system using GCC, an uncontested mutex lock/unlock is well under 1 microsecond. I have a lot of experience here from writing low-latency financial systems. The hot path we use is littered with uncontested mutex lock/unlock, and the whole path still runs under 20 microseconds. (With the vast majority of that time unrelated to mutex acquisition.) The benchmark used in the blog post must be spending the vast majority of its time in some section of code that has nothing to do with lock/unlock. |
|