same method

  1. @override
bool same(
  1. IMap<K, V> other
)
override

Will return true only if the maps internals are the same instances (comparing by identity). This will be fast even for very large maps, since it doesn't compare each entry.

Note: This is not the same as identical(map1, map2) since it doesn't compare the maps themselves, but their internal state. Comparing the internal state is better, because it will return true more often.

Implementation

@override
bool same(IMap<K, V> other) => identical(_m, other._m) && (config == other.config);