The Scala collections library provides specialised implementations for Sets of fewer than 5 values (see the source).
The iterators for these implementations return elements in the order in which they were added, rather than the
consistent, hash-based ordering used for larger Sets.
Furthermore, sameElements (scaladoc) is defined on Iterables (it is implemented in IterableLike - see the source);
it returns true only if the iterators return the same elements in the same order.