#5924: Back Cmm generated for updating one element in Array#
------------------------------+---------------------------------------------
 Reporter:  tibbe             |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 I've attached a small standalone program that implements the following
 function:

 {{{
 -- | /O(n)/ Update the element at the given position in this array.
 update16 :: Array e -> Int -> e -> Array e
 }}}

 which update one element (by copying the whole array) of an array of size
 16. The attachment includes the optimized Cmm for a call to this function,
 together with a bunch of comments (inline with the Cmm) by me, pointing
 out inefficiencies in the generated Cmm.

 My overall goal is to make this particular function fast. This might
 involve fixes to the code generator and/or adding primitives whether that
 makes sense. In any case this code might be a good source of ideas for
 improvements to the code generator.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to