Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 405 Bytes

performance.md

File metadata and controls

13 lines (9 loc) · 405 Bytes

Performance

Note that parallel Streams are not always faster than sequential Streams. Especially when the number of elements is small, we can expect sequential Streams to be faster.

The operation that profits most from parallelization is filter()

{% hint style="info" %} If you are not sure wich implementation to choose, let the builder decide:

Stream.of(range(1000))

{% endhint %}