我正在閱讀Book Java Concurrency in Practice 。在第15章中，他們討論了非阻塞算法和比較和交換（CAS）方法。
It is written that CAS perform much better than the locking methods. I want to ask the people who already worked with both of these concepts and would like to hear when you are preferring which one of these concepts? Is it really so much faster?
I know there is maybe not a strict rule when to use what. But I just would like to hear some opinions, experiences with the new concept of CAS.