Switch IO manager to a mutable hashtable
authorBryan O'Sullivan <bos@serpentine.com>
Wed, 14 Aug 2013 10:43:36 +0000 (03:43 -0700)
committerAndreas Voellmy <andreas.voellmy@gmail.com>
Tue, 3 Sep 2013 20:05:05 +0000 (16:05 -0400)
commit239bc1dda6bc6799382736538af75a2f01686503
tree6f77f685b7cd1185a55623781350b972cd9408ef
parent3cb2d582fef3f79d1f21cf7bd984a7477c58e9e4
Switch IO manager to a mutable hashtable

This data structure (IntTable) provides a similar API to its predecessor
(IntMap), at half the number of lines in size.

When tested in isolation using criterion, IntTable is much faster than
IntMap: over 15x, according to my criterion benchmarks.

This translates into a measurable improvement when used in the IO manager:
using weighttp to benchmark acme-http under various configurations on two
32-core Linux servers connected by a 10gbE network, I see between a 3%
and 10% increase in requests served per second compared to IntMap.

Signed-off-by: Andreas Voellmy <andreas.voellmy@gmail.com>
GHC/Event/Arr.hs [new file with mode: 0644]
GHC/Event/IntMap.hs [deleted file]
GHC/Event/IntTable.hs [new file with mode: 0644]
GHC/Event/Manager.hs
GHC/Event/Thread.hs
base.cabal