Skip to content

6.1.0

Compare
Choose a tag to compare
@autorelease3 autorelease3 released this 09 Nov 01:52
· 32 commits to develop since this release
6.1.0
5c0aeba

💡 Improvements

  • If one has a Stream<Optional<T>> stream of size N and does stream.flatMap(Optional::stream), you’ll end up allocating N extra streams — one for each Optional input element. When N is large, those allocations can cause extra GC cycles and pauses if allocation rate is high enough leading to issues with latency, throughput, and allocation sensitive code paths.

    Stream.filter(Optional::isPresent).map(Optional::get) is more efficient than Stream.flatMap(Optional::stream) as it does not allocate a new Stream for every element in the stream. (#2946)