faster set iterator with test