That would depend on internals of MemberQ in terms of how it determines equivalence. But you’ve posed a question that, as it stands, is not possible to answer. You have neglected to provide any details about the types of sets you will consider for such testing. Are they always symbols? Exact numbers? Real numbers, possibly with different precisions? Perhaps more importantly, do you consider multiplicitiy of elements as meaningful? If not, then Sort won’t be the function to use, since for example {a,a,b}=!={a,b}.