If I have a collection and I want to iterate over a filtered stream then I could do either of the following (and many more obtuse options):
for(item in collection.stream().filter(...).collect(Collectors.toList()))
for(item in collection.stream().filter(...).collect(Collectors.toSet()))
Which is faster? A list or a set? Is there some way to collect to simply an Iterable or some other type I can iterate on?