optimizate the performance for Set operations