Branch: Tag:

2019-02-02

2019-02-02 17:12:32 by Tobias S. Josefowitz <tobij@tobij.de>

Mapping: m1 & m2 optimization followup

There is no good reason to copy m1 in the m1 << m2 case, as we walk and
insert all values anyway. Start out with an empty mapping instead.

1795:    }    UNSET_ONERROR(err);    } else { -  /* Copy the first mapping */ -  res = copy_mapping(a); +  /* Loop over second mapping, insert into new one */ +  res = allocate_mapping(0);    SET_ONERROR(err, do_free_mapping, res);       /* Remove elements in res that aren't in b, copy values for those that
1810:    break;    }    } -  if (!k2) { -  map_delete(res, &k->ind); +     } -  } +        UNSET_ONERROR(err);    }