Avoid iterating over the whole set