Open
Description
unordered-containers/Data/HashMap/Internal.hs
Lines 2050 to 2054 in 10328f2
By contrast, fromListWith
is documented to be O(n*log n).
The difference between these functions is that the former uses unsafeInsert
while the latter uses unsafeInsertWith
. Both are recursive though, so I don't understand how fromList
gets away with linear complexity?!