Dict keys equality

I suspect it’s faster to compare the lengths of the dictionaries rather than testing set membership in both directions. I’d propose something like this:

Base.:(==)(a::Base.KeyIterator, b::Base.KeyIterator) = length(a)==length(b) && all(k->in(k,b), a)
2 Likes