[GHC] #10652: Better cache performance in Array#

GHC ghc-devs at haskell.org
Tue Jul 28 21:51:26 UTC 2015


#10652: Better cache performance in Array#
-------------------------------------+-------------------------------------
        Reporter:  MikeIzbicki       |                   Owner:
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 So to simplify, the use case is something like
 {{{
 data IntArrayTree = IntArrayTree {
   value    :: {-# UNPACK #-} !Int,
   children :: {-# UNPACK #-} !(Array Int IntArrayTree)
   }
 }}}
 and arguably the underlying problem that would be nice to fix is that
 there are two levels of indirection (`IntArrayTree` -> `Array#` ->
 `IntArrayTree`) per level of the tree.

 Of note is that the `IntArrayTree` values themselves are actually of
 constant size. But we can't store them efficiently in any sort of array
 because they contain a mix of pointer and non-pointer fields.

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


More information about the ghc-tickets mailing list