By: Eric Bron (eric.bron.delete@this.zvisuel.privatefortest.com), December 9, 2014 1:33 am
Room: Moderated Discussions
>>you mean a sequence such as
> >
> > EnterCriticalSection(cs1);
> > EnterCriticalSection(cs2);
> > LeaveCriticalSection(cs2);
> > LeaveCriticalSection(cs1);
> so an acquire-release pair for std::mutex requires 4 CS operations.
yes, the 4 operations in my code above, I'm quite sure it doesn't explain the observed timings
> I've usually been most interested in the performance of locks that are relatively uncontended since
> that reflects the best achievable performance given a 'good' application design. Once
I agree with you on the importance of the uncontended case but if your locks are slow enough you can broke any good design
> >
> > EnterCriticalSection(cs1);
> > EnterCriticalSection(cs2);
> > LeaveCriticalSection(cs2);
> > LeaveCriticalSection(cs1);
> so an acquire-release pair for std::mutex requires 4 CS operations.
yes, the 4 operations in my code above, I'm quite sure it doesn't explain the observed timings
> I've usually been most interested in the performance of locks that are relatively uncontended since
> that reflects the best achievable performance given a 'good' application design. Once
I agree with you on the importance of the uncontended case but if your locks are slow enough you can broke any good design