mykhailo-saienko / ipp

This project augments and extends the standard Java Iterator and Iterable classes
MIT License
0 stars 0 forks source link

Iterables: Get rid of stream/lambda-based routines? #3

Open mykhailo-saienko opened 5 years ago

mykhailo-saienko commented 5 years ago

Consider re-writing util-functions Iterables::any, all, forEach, etc. without resorting to Java Streams but rather using Iterator's forEachRemaining and direct for-loops. Some argue that creating Streams strangles performance.

We need to write some performance tests. In particular, the above assertions about the performance issues with Streams-based loops might ignore the one-off performance overhead when creating lambdas for the first time. Maybe, the performance is comparable once the lambdas are created.