[GHC] #8923: Add SmallArray# type
GHC
ghc-devs at haskell.org
Sat Mar 29 10:24:51 UTC 2014
#8923: Add SmallArray# type
-------------------------------------+------------------------------------
Reporter: tibbe | Owner: tibbe
Type: feature request | Status: patch
Priority: normal | Milestone: 7.10.1
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by Johan Tibell <johan.tibell@…>):
In [changeset:"90329b6cc183b3cd05956ae6bdeb6ac6951549c2/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="90329b6cc183b3cd05956ae6bdeb6ac6951549c2"
Add SmallArray# and SmallMutableArray# types
These array types are smaller than Array# and MutableArray# and are
faster when the array size is small, as they don't have the overhead
of a card table. Having no card table reduces the closure size with 2
words in the typical small array case and leads to less work when
updating or GC:ing the array.
Reduces both the runtime and memory allocation by 8.8% on my insert
benchmark for the HashMap type in the unordered-containers package,
which makes use of lots of small arrays. With tuned GC settings
(i.e. `+RTS -A6M`) the runtime reduction is 15%.
Fixes #8923.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8923#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list