Hi all,

Most of our C5 development have used java8 streams api frequently more than
the for loops.
But there are some research have done to compare the performance of streams
api compared to for loops. They have shown that stream API is slow compared
to for loops in many scenarios (even for parallel streams). [1][2]

Is there any proper guidance to use which one over the other or are we
using streams as a practice in C5 development

[1] -
https://blog.jooq.org/2015/12/08/3-reasons-why-you-shouldnt-replace-your-for-loops-by-stream-foreach/
[2] -
https://jaxenter.com/java-performance-tutorial-how-fast-are-the-java-8-streams-118830.html

Thanks!
Rajith

-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to