title: what's more efficient? checking == or just mutating the variable?
body: <p>Imagine I had a variable called X.
  Let's say every 5 seconds I wanted to make X = true. (it could be either true or false in between these 5 seconds, but gets reset to true when the 5 seconds are up).</p>
  
  <p>Would it be more efficient to check if the value is already true, then if not, reassign it to true? Or just have X = true?</p>
  
  <p>in other words, which would run faster?</p>
  
  <pre><code>if(x==false){
      x = true;
  }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>x = true;
  </code></pre>
  
  <p>On one hand, the first program won't mutate the variable if it doesn't have to. On the other hand, the second program doesn't need to check what X is equal to; it dives straight in.</p>