Skip to main content

All Questions

Filter by
Sorted by
Tagged with
-1 votes
1 answer
517 views

Improve response time Java / Stream / filter

I am doing a comparison between two lists of objects using streams (filter/anyMatch). The size of the two lists can be up to a million objects. I ran a test with the code below. Often the size of the ...
YK mar's user avatar
  • 677
1 vote
2 answers
179 views

How can I use stream for a recursion in Java 8 to find groups of elements between "START" and "END"?

I have a method like this where I'm using recursion with normal loop: // example for the args: "START" "RUN" "RUN" "END" "RUN" "START" "...
Xuân Dũng Đoàn's user avatar
1 vote
2 answers
352 views

Java Streams: Is the complexity of collecting a stream of long same as filtering it based on Set::contains?

I have an application which accepts employee ids as user input and then filters the employee list for matching ids. User input is supposed to be 3-4 ids and employee list is a few thousands. I came up ...
ankit3j's user avatar
  • 51