Yes, always measure. As N goes up, one would expect the set ( average O(N) ) to be significantly faster, even if we do not copy the large vector for the sort. (Till memory becomes the bottleneck).
For instance, with 106 random numbers, without a copy of the vector, on the same libstdc++ implementation:
PS. For the set method, the time taken is pretty much dependent upon the position of the first duplicate. If the first 2 elements are the duplicate, then the sort method will still sort - incurring that time cost - but the set method would return almost immediately.
For me, for 10^6 ascending numbers with only the last 2 duplicate, the set method gives 238 ms - as opposed to 0ms when the first 2 elements are duplicate!