title: Is uninitialized local variable the fastest random number generator?
body: <p>I know the uninitialized local variable is undefined behaviour(<em>UB</em>), and also the value may have trap representations which may affect further operation, but sometimes I want to use the random number only for visual representation and will not further use them in other part of program, for example, set something with random color in a visual effect, for example:</p>
  
  <pre><code>void updateEffect(){
      for(int i=0;i&lt;1000;i++){
          int r;
          int g;
          int b;
          star[i].setColor(r%255,g%255,b%255);
          bool isVisible;
          star[i].setVisible(isVisible);
      }
  }
  </code></pre>
  
  <p>is it that faster than</p>
  
  <pre><code>void updateEffect(){
      for(int i=0;i&lt;1000;i++){
          star[i].setColor(rand()%255,rand()%255,rand()%255);
          star[i].setVisible(rand()%2==0?true:false);
      }
  }
  </code></pre>
  
  <p>and also faster than other random number generator?</p>