title: When to use Optional.orElse() rather than Optional.orElseGet()
body: <p>I've read the answers to this <a href="https://stackoverflow.com/questions/33170109/difference-between-optional-orelse-and-optional-orelseget">question</a> about the difference between <code>Optional.orElse()</code> and <code>Optional.orElseGet()</code>.</p>
  
  <p>It seems that <code>orElseGet()</code> is always more efficient than <code>orElse()</code> because of lazy evaluation, and it's apparently visible even when benchmarking very simple examples like this one (see part 4): <a href="https://www.baeldung.com/java-optional-or-else-vs-or-else-get" rel="noreferrer">https://www.baeldung.com/java-optional-or-else-vs-or-else-get</a></p>
  
  <p>So, are there any use cases where it's better to use <code>orElse</code> rather than <code>orElseGet</code>?</p>