Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The use of sequential consistency as the sole memory model mechanism makes it easy for a programmer to follow the logic, however, introduces a performance penalty. Implementing synchronization correctly guarantees sequential consistency and is consequently, a more expensive operation that all executions of the program are sequentially consistent. Consequently, synchronizing code is more expensive than using volatile variables which guarantee a weaker form of sequential consistency.

...