Comment Comment by sicp-enjoyer This person is already putting sets inside vectors, so I don't think they are worried about storage.But yes, you either need to stop occasionally and remove the duplicates or use a set, if the storage is prohibitive.Otherwise in terms of performance, sorting and unique is much faster than inserting one element at a time in a set. parent sicp-enjoyer 3 years ago
But yes, you either need to stop occasionally and remove the duplicates or use a set, if the storage is prohibitive.
Otherwise in terms of performance, sorting and unique is much faster than inserting one element at a time in a set.