Ticket #3149 (closed bug: fixed)
Data.HashTable is slow
| Reported by: | dons | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | _|_ |
| Component: | libraries/base | Version: | 6.10.1 |
| Keywords: | Cc: | ertai, merehap@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Data.HashTable? is slow. Implement something non-naive, and move it out of base. It's a bit embarassing. See e.g.
import Prelude hiding (lookup) import Data.HashTable (hashInt, fromList, lookup) n :: Int n = 10000000 l :: [Int] l = [1..n] stream :: [(Int, Int)] stream = zip l l main = do m <- fromList hashInt stream v <- lookup m 100 print v
Maybe just port the OCaml standard hashtable?
Change History
Note: See
TracTickets for help on using
tickets.
