You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our default value comparer(s) for primitive collections do deep comparison, i.e. they check equality for each and every element. When we implement nested primitive collections (#30713), this will have to be recursive.
If the primitive collection type is known to be immutable (e.g. implements IImmutableList), we can instead switch to the much cheaper reference comparison instead.
One possible objection here is that the immutable list may contain mutable elements, in which case the value comparer would miss something being changed (IIRC we discussed this and decided its OK).
The text was updated successfully, but these errors were encountered:
Note we can do this safely if we can determine that the elements really are immutable, which could be related to general work to support immutable types.
Our default value comparer(s) for primitive collections do deep comparison, i.e. they check equality for each and every element. When we implement nested primitive collections (#30713), this will have to be recursive.
If the primitive collection type is known to be immutable (e.g. implements IImmutableList), we can instead switch to the much cheaper reference comparison instead.
One possible objection here is that the immutable list may contain mutable elements, in which case the value comparer would miss something being changed (IIRC we discussed this and decided its OK).
The text was updated successfully, but these errors were encountered: