title: What is better: multiple "if" statements or one "if" with multiple conditions?
body: <p>For my work I have to develop a small Java application that parses very large XML files (~300k lines) to select very specific data (using <code>Pattern</code>), so I'm trying to optimize it a little. I was wondering what was better between these 2 snippets:</p>
  
  <pre><code>if (boolean_condition &amp;&amp; matcher.find(string)) {
      ...
  }
  </code></pre>
  
  <p><strong>OR</strong></p>
  
  <pre><code>if (boolean_condition) {
      if (matcher.find(string)) {
          ...
      }
  }
  </code></pre>
  
  <p>Other details: </p>
  
  <ul>
  <li>These if statements are executed on each iteration inside a loop (~20k iterations)</li>
  <li>The <code>boolean_condition</code> is a <code>boolean</code> calculated on each iteration using an external function</li>
  <li>If the <code>boolean</code> is set to <code>false</code>, I don't need to test the regular expression for matches</li>
  </ul>
  
  <p>Thanks for your help.</p>