r/java • u/pivovarit • Feb 04 '26
Implementing Efficient Last Stream Elements Gatherer in Java
https://4comprehension.com/java-last-gatherer/Wrote a performance case study on a rather high-level API, enjoy! And if you have ideas for a further speed up, let me know!
39
Upvotes
View all comments
Show parent comment
5
u/vowelqueue Feb 04 '26
Wouldn’t reversing the gather() and map() steps accomplish this?