Skip to content

Commit bd31e60

Browse files
committed
Add comment
1 parent c4fa391 commit bd31e60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Data/HashMap/Internal.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,6 +1883,9 @@ differenceArrays diff s b1 ary1 t1 b2 ary2
18831883
n -> bitmapIndexedOrFull bResult <$> (A.unsafeFreeze =<< A.shrink mary n)
18841884
{-# INLINABLE differenceArrays #-}
18851885

1886+
-- TODO: This could be faster if we would keep track of which elements of ary2
1887+
-- we've already matched. Those could be skipped when we check the following
1888+
-- elements of ary1.
18861889
differenceCollisions :: Eq k => Hash -> A.Array (Leaf k v1) -> HashMap k v1 -> Hash -> A.Array (Leaf k v2) -> HashMap k v1
18871890
differenceCollisions h1 ary1 t1 h2 ary2
18881891
| h1 == h2 =

0 commit comments

Comments
 (0)