title: Does Java compiler optimize stream filtering?
body: <p>Let's have a case:</p>
  
  <pre><code>x.stream().filter(X::isFlag).filter(this::isOtherFlag).reduce(...)
  </code></pre>
  
  <p>Does it differ from this one?</p>
  
  <pre><code>x.stream().filter(predicate(X::isFlag).and(this::isOtherFlag)).reduce(...)
  </code></pre>