How can I improve my solution with threads or futures?

Hello, I have to submit an assignment for my university. The assignment involves HTTP messages. I'm supposed to filter out the IDs of requests that don't have a response. My solution works but is very slow. Can I use threads or futures to speed up my solution so that the checkForDupes method is executed in…