We need to loop to compare the values instead of using a dictionary because the values are not necessary hashable. But it is still an improvement compared to calling the set method for each record. issue5398 review19111002