title: volatile vs final fields performance
body: <p>What is preferable for performance? Assume no to little contention</p>
  
  <ol>
  <li>mutable class with volatile fields and updating them one by one</li>
  <li>immutable class with final fields, an update cycle avoids the
  multi-field update and instead re-creates the class once</li>
  </ol>
  
  <p>Volatiles require memory barriers on every write, I suppose the same is true for final fields? Meaning a single memory barrier upon object construction?</p>
  
  <p><em>Update for clarification:</em> </p>
  
  <p>I feel the question is valuable on its own and answerable generically, taking into account the java memory model and current gen hardware. If you must assume specifics:</p>
  
  <ul>
  <li>the object is of course accessed from multiple threads, otherwise this exercise would be pointless</li>
  <li>a single object is long-lived, as in multiple hours</li>
  <li>there are hundreds to thousands of those objects, with hundreds to thousands of update events per second</li>
  </ul>