[GHC] #8158: Replace IO manager's IntMap with a mutable hash table

GHC ghc-devs at haskell.org
Fri Aug 23 06:25:40 UTC 2013


#8158: Replace IO manager's IntMap with a mutable hash table
-------------------------------------------+-------------------------------
       Reporter:  bos                      |             Owner:
           Type:  feature request          |            Status:  new
       Priority:  normal                   |         Milestone:  7.8.1
      Component:  libraries/base           |           Version:  7.7
       Keywords:                           |  Operating System:
   Architecture:  Unknown/Multiple         |  Unknown/Multiple
     Difficulty:  Easy (less than 1 hour)  |   Type of failure:  Other
     Blocked By:                           |         Test Case:
Related Tickets:                           |          Blocking:
-------------------------------------------+-------------------------------
 I've written a patch that replaces the immutable !IntMap used by GHC.Event
 with a mutable hashtable, !IntTable.

 There's a standalone version of the new data structure, complete with
 !QuickCheck tests and benchmarks,
 [[https://github.com/bos/inttable|available on github]]. It's about 15x
 faster than !IntMap, and substantially simpler.

 In practice, this translates to a small but measurable improvement in
 throughput (and presumably latency). I see a 3% to 10% bump in requests
 handled per second by the tiny [[http://hackage.haskell.org/package/acme-
 http|acme-http http server]] when benchmarked using the
 [[https://github.com/lighttpd/weighttp|weighttp load tester]].

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8158>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list