title: Is collectingAndThen method enough efficient?
body: <p>I have recently started using collectingAndThen and found that it is taking a bit long time comparatively to the other coding procedures, which i used for performing the similar tasks.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>        System.out.println("CollectingAndThen");
          Long t = System.currentTimeMillis();
          String personWithMaxAge = persons.stream()
                                          .collect(Collectors.collectingAndThen(
                                                                  Collectors.maxBy(Comparator.comparing(Person::getAge)),
                                                                  (Optional&lt;Person&gt; p) -&gt; p.isPresent() ? p.get().getName() : "none"
                                                  ));
  
  
          System.out.println("personWithMaxAge - "+personWithMaxAge + " time taken = "+(System.currentTimeMillis() - t));
          Long t2 = System.currentTimeMillis();
          String personWithMaxAge2 = persons.stream().sorted(Comparator.comparing(Person::getAge).reversed())
                                                      .findFirst().get().name;
          System.out.println("personWithMaxAge2 : "+personWithMaxAge2+ " time taken = "+(System.currentTimeMillis() - t2));
  </code></pre>
  
  <p>And here it the output:</p>
  
  <pre><code>CollectingAndThen
  personWithMaxAge - Peter time taken = 17
  personWithMaxAge2 : Peter time taken = 1
  </code></pre>
  
  <p>which is showing that collectingAndThen is taking a greater time comparatively.</p>
  
  <p>So my question is - Should I keep on collectingAndThen or there is some other suggestions?</p>