Skip to content

Commit 5779cc8

Browse files
oberblastmeistersjakobi
authored andcommitted
remove use of two for now for insert'
1 parent 429fb1d commit 5779cc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/HashMap/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ insert' h0 k0 v0 m0 = go h0 k0 v0 0 m0
835835
where i = index h s
836836
go h k x s t@(Collision hy v)
837837
| h == hy = Collision h (updateOrSnocWith (\a _ -> (# a #)) k x v)
838-
| otherwise = runST $ two s h k x hy t
838+
| otherwise = go h k x s $ BitmapIndexed (mask hy s) (A.singleton t)
839839
{-# INLINABLE insert' #-}
840840

841841
-- | Insert optimized for the case when we know the key is not in the map.

0 commit comments

Comments
 (0)