anchor.diff:           {Cnt, State#state{namsp = NewNames}}
      end.
   
  -get_text_id(#state{texts = Names} = State, Val) ->
  -   case maps:find(Val, Names) of
  -      {ok, Id} ->
  +get_text_id(#state{texts = Texts} = State, Val) ->
  +   case ets:lookup(Texts, Val) of
  +      [{_,Id}] ->
            {Id,State};
  -      error ->
  -         Cnt = maps:size(Names) + 1,
  -         NewNames = maps:put(Val, Cnt, Names),
  -         {Cnt, State#state{texts = NewNames}}
  +      [] ->
  +         Cnt = ets:info(Texts, size) + 1,
  +         _ = ets:insert_new(Texts, {Val,Cnt}),
  +         {Cnt, State}
      end.
  +%%    case maps:find(Val, Names) of
  +%%       {ok, Id} ->
  +%%          {Id,State};
  +%%       error ->
  +%%          Cnt = maps:size(Names) + 1,
  +%%          NewNames = maps:put(Val, Cnt, Names),
  +%%          {Cnt, State#state{texts = NewNames}}
  +%%    end.
   
   %% -record(nodes, {id = -1, tp = -1, atsz = 0, sz = 0, dst = 0, ln = 0, ns = 0, val = 0}).
   
  
positive.code:                 #{file  => Name,
                    base  => Name,
                    nodes => map_to_bin(State1#state.nodes),
                    texts => State1#state.texts,
                    names => State1#state.names,
                    namsp => State1#state.namsp,
                    att_types => State1#state.att_types};
  
negative.code:                 #{file  => Name,
                    base  => Name,
                    nodes => map_to_bin(State2#state.nodes),
                    texts => add_text_lookup(State2#state.texts),
                    names => State2#state.names,
                    namsp => State2#state.namsp,
                    att_types => State2#state.att_types}
  