[GHC] #9796: Implement amap/coerce rule for `Array`

GHC ghc-devs at haskell.org
Thu Nov 13 20:15:53 UTC 2014


#9796: Implement amap/coerce rule for `Array`
-------------------------------------+-------------------------------------
              Reporter:  dfeuer      |            Owner:  dfeuer
                  Type:  task        |           Status:  patch
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Core        |          Version:  7.9
  Libraries                          |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Easy (less than 1
  Unknown/Multiple                   |  hour)
       Type of failure:  Runtime     |       Blocked By:
  performance bug                    |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D471   |
-------------------------------------+-------------------------------------

Comment (by Herbert Valerio Riedel <hvr@…>):

 In [changeset:"603b7be7bd3abaf0e2c210e8d9015b1d613b4715/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="603b7be7bd3abaf0e2c210e8d9015b1d613b4715"
 Implement amap/coerce for Array (re #9796)

 Implement an `amap`/`coerce` rule in `GHC.Arr` to match the
 `map`/`coerce` rule in GHC.Base.

 In order to do so, delay inlining `amap` until phase 1.

 To prevent the inlining delay from causing major inefficiencies due to
 missed list fusion, rewrite `amap` to avoid relying on list fusion. This
 has the extra benefit of reducing the size of the compiled amap code by
 skipping the impossible case of an array with a negative size.

 Reviewed By: nomeata

 Differential Revision: https://phabricator.haskell.org/D471
 }}}

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


More information about the ghc-tickets mailing list