Changes between Version 2 and Version 3 of Proposals/unordered-containers
- Timestamp:
- 03/19/13 00:08:50 (2 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Proposals/unordered-containers
v2 v3 3 3 = Proposal: Add the unordered-containers package and the hashable package to the Haskell Platform = 4 4 5 This is a proposal for the 'attoparsec' package version 0.2.3.0 and the 'hashable'package version 1.1.2.5 to be included in the next major release of the Haskell platform.5 This is a proposal for the unordered-containers package version 0.2.3.0 and the hashable package version 1.1.2.5 to be included in the next major release of the Haskell platform. 6 6 7 7 Everyone is invited to review this proposal, following the [http://trac.haskell.org/haskell-platform/wiki/AddingPackages standard procedure for proposing and reviewing packages]. … … 23 23 = Abstract = 24 24 25 The 'unordered-containers' package implements hashing-based containers that trade some functionality (lack of ordering) for speed. The 'hashable'package provides a type class that, like Ord, is implemented by all types that can be used as keys in these containers.25 The unordered-container' package implements hashing-based containers that trade some functionality (lack of ordering) for speed. The hashable package provides a type class that, like Ord, is implemented by all types that can be used as keys in these containers. 26 26 27 27 Documentation and tarballs from Hackage: … … 67 67 = Design decisions = 68 68 69 ## Type class instead of higher-order function to generate hash values 69 == Type class instead of higher-order function to generate hash values == 70 70 71 71 Instead of using a type class to create hash values one could use a higher-order argument to the container constructor … … 84 84 * It's faster: GHC does a better job specializing functions that use dictionaries (via `INLIABLE`) than functions that use higher-order arguments. 85 85 86 == Insert vs lookup performance == 87 88 The data structure (a hash array mapped trie) that's used to implement unordered-containers trades some insert performance for a much better lookup performance. This is a sensible trade-off for the majority of applications, but there are a few programs where using e.g. `Data.IntMap` might be better. 89 86 90 = Open issues = 87 91
