File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1899,12 +1899,14 @@ difference = go 0
18991899differenceCollisions :: Eq k => Hash -> A. Array (Leaf k v1 ) -> HashMap k v1 -> Hash -> A. Array (Leaf k v2 ) -> HashMap k v1
19001900differenceCollisions ! h1 ! ary1 t1 ! h2 ! ary2
19011901 | h1 == h2 =
1902- let ary = A. filter (\ (L k1 _) -> isNothing (indexOf k1 ary2)) ary1
1903- in case A. length ary of
1904- 0 -> Empty
1905- 1 -> Leaf h1 (A. index ary 0 )
1906- n | A. length ary1 == n -> t1
1907- | otherwise -> Collision h1 ary
1902+ if A. unsafeSameArray ary1 ary2
1903+ then Empty
1904+ else let ary = A. filter (\ (L k1 _) -> isNothing (indexOf k1 ary2)) ary1
1905+ in case A. length ary of
1906+ 0 -> Empty
1907+ 1 -> Leaf h1 (A. index ary 0 )
1908+ n | A. length ary1 == n -> t1
1909+ | otherwise -> Collision h1 ary
19081910 | otherwise = t1
19091911{-# INLINABLE differenceCollisions #-}
19101912
You can’t perform that action at this time.
0 commit comments