#4928: Add primops for copying/cloning an array
------------------------------+---------------------------------------------
  Reporter:  tibbe            |          Owner:  simonmar        
      Type:  feature request  |         Status:  patch           
  Priority:  normal           |      Milestone:  7.4.1           
 Component:  Runtime System   |        Version:  7.0.1           
Resolution:                   |       Keywords:                  
  Testcase:                   |      Blockedby:                  
Difficulty:                   |             Os:  Unknown/Multiple
  Blocking:                   |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown     |  
------------------------------+---------------------------------------------

Comment(by tibbe):

 `copyArray#` spends more time in the C-- code so perhaps there's room for
 optimization there:

 {{{
 $ perf record -f ./bench copyArray# 32 10000000
 copyArray#: 0.354839s
 [ perf record: Woken up 1 times to write data ]
 [ perf record: Captured and wrote 0.083 MB perf.data (~3624 samples) ]
 $ perf report
 # Samples: 3564
 #
 # Overhead          Command        Shared Object  Symbol
 # ........  ...............  ...................  ......
 #
     58.89%            bench  ./bench              [.] stg_copyArrayzh
     34.37%            bench  /lib/libc-2.11.1.so  [.] memcpy
      3.11%            bench  ./bench              [.] s233_info
      1.71%            bench  ./bench              [.] s235_info
      1.43%            bench  ./bench              [.] memcpy@plt
      0.03%  perf_2.6.32-gg4  [kernel]             [k] audit_syscall_exit
      0.03%  perf_2.6.32-gg4  [kernel]             [k] format_decode
      0.03%  perf_2.6.32-gg4  [kernel]             [k] memcpy_c
      0.03%            bench  [kernel]             [k] up_read
      0.03%            bench  [kernel]             [k] filemap_fault
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4928#comment:20>
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