Using SplayIntSet for faster insert performance.