I suspect it’s faster to compare the length
s 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)