File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -740,7 +740,10 @@ collision h !e1 !e2 =
740740
741741-- | Create a 'BitmapIndexed' or 'Full' node.
742742bitmapIndexedOrFull :: Bitmap -> A. Array (HashMap k v ) -> HashMap k v
743- bitmapIndexedOrFull b ary
743+ -- The strictness in @ary@ helps achieve a nice code size reduction in
744+ -- @unionWith[Key]@ with GHC 9.2.2. See the Core diffs in
745+ -- https://github.com/haskell-unordered-containers/unordered-containers/pull/376.
746+ bitmapIndexedOrFull b ! ary
744747 | b == fullNodeMask = Full ary
745748 | otherwise = BitmapIndexed b ary
746749{-# INLINE bitmapIndexedOrFull #-}
@@ -1615,7 +1618,10 @@ unionWithKey f = go 0
16151618-- | Strict in the result of @f@.
16161619unionArrayBy :: (a -> a -> a ) -> Bitmap -> Bitmap -> A. Array a -> A. Array a
16171620 -> A. Array a
1618- unionArrayBy f b1 b2 ary1 ary2 = A. run $ do
1621+ -- The manual forcing of @b1@, @b2@, @ary1@ and @ary2@ results in handsome
1622+ -- Core size reductions with GHC 9.2.2. See the Core diffs in
1623+ -- https://github.com/haskell-unordered-containers/unordered-containers/pull/376.
1624+ unionArrayBy f ! b1 ! b2 ! ary1 ! ary2 = A. run $ do
16191625 let b' = b1 .|. b2
16201626 mary <- A. new_ (popCount b')
16211627 -- iterate over nonzero bits of b1 .|. b2
You can’t perform that action at this time.
0 commit comments