-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Description
unordered-containers/Data/HashSet/Internal.hs
Lines 448 to 451 in db40495
| -- | \(O(n \min(W, n))\) Construct a set from a list of elements. | |
| fromList :: (Eq a, Hashable a) => [a] -> HashSet a | |
| fromList = HashSet . List.foldl' (\ m k -> H.insert k () m) H.empty | |
| {-# INLINE fromList #-} |
Using unsafeInsert instead of insert should speed this up.