Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are few, if any, good references on this because there is so much variation. It depends on basically everything including bus speed, memory speed, processor speed, processor count, surrounding instructions, memory fencing and quite possibly the angle between the moon and Mt Everest...</p> <p>If you have a very specific application, as in, known (fixed) hardware, operating environment, a real-time operating system and exclusive control, then maybe it will matter. In this case, benchmark. If you don't have this level of control over where your software is running, any measurements are effectively meaningless.</p> <p>As discussed in <a href="https://stackoverflow.com/questions/1585825/do-atomic-operations-become-slower-as-more-cpus-are-added">these answers</a>, locks are implemented using CAS, so if you can get away with CAS instead of a lock (which will need at least two operations) it will be faster (noticeably? only maybe).</p> <p>The best references you will find are the <a href="http://www.intel.com/products/processor/manuals/" rel="nofollow noreferrer">Intel Software Developer's Manuals</a>, though since there is so much variation they won't give you an actual number. They will, however, describe how to get the best performance possible. Possibly a processor datasheet (such as those <a href="http://www.intel.com/design/corei7ee/documentation.htm" rel="nofollow noreferrer">here</a> for the i7 Extreme Edition, under "Technical Documents") will give you actual numbers (or at least a range).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload