anchor.diff:        Set2 :: set(Element),
         Set3 :: set(Element).
   intersection(#{}=S1, #{}=S2) ->
  -    maps:intersect(S1, S2);
  +    case map_size(S1) < map_size(S2) of
  +        true ->
  +            Next = maps:next(maps:iterator(S1)),
  +            intersection_heuristic(Next, [], [], floor(map_size(S1) * 0.75), S1, S2);
  +        false ->
  +            Next = maps:next(maps:iterator(S2)),
  +            intersection_heuristic(Next, [], [], floor(map_size(S2) * 0.75), S2, S1)
  +    end;
   intersection(S1, S2) ->
       case size(S1) < size(S2) of
           true ->
  
positive.code:         {K, _, NextIter} ->
              case Fun(K) of
                  true ->
                      [{K,?VALUE} | filter_1(Fun, NextIter)];
                  false ->
                      filter_1(Fun, NextIter)
              end;
  
negative.code:       Set1 :: set(Element),
        Set2 :: set(Element),
        Set3 :: set(Element).
  
  subtract(#{}=S1, #{}=S2) ->
      Next = maps:next(maps:iterator(S1)),
      subtract_heuristic(Next, [], [], floor(map_size(S1) * 0.75), S1, S2);
  subtract(S1, S2) ->
      filter(fun (E) -> not is_element(E, S2) end, S1).
  
  %% If we are keeping more than 75% of the keys, then it is
  %% cheaper to delete them. Stop accumulating and start deleting.
  subtract_heuristic(Next, _Keep, Delete, 0, Acc, Reference) ->
    subtract_decided(Next, remove_keys(Delete, Acc), Reference);
  subtract_heuristic({Key, _Value, Iterator}, Keep, Delete, KeepCount, Acc, Reference) ->
      Next = maps:next(Iterator),
      case Reference of
          #{Key := _} ->
              subtract_heuristic(Next, Keep, [Key | Delete], KeepCount, Acc, Reference);
          _ ->
              subtract_heuristic(Next, [Key | Keep], Delete, KeepCount - 1, Acc, Reference)
      end;
  subtract_heuristic(none, Keep, _Delete, _Count, _Acc, _Reference) ->
      maps:from_keys(Keep, ?VALUE).
  
  subtract_decided({Key, _Value, Iterator}, Acc, Reference) ->
      case Reference of
          #{Key := _} ->
              subtract_decided(maps:next(Iterator), maps:remove(Key, Acc), Reference);
          _ ->
              subtract_decided(maps:next(Iterator), Acc, Reference)
      end;
  subtract_decided(none, Acc, _Reference) ->
      Acc.
  
  %% is_subset(Set1, Set2) -> boolean().
  %%  Return 'true' when every element of Set1 is also a member of
  