#3586: Initialisation of unboxed arrays is too slow
-----------------------------------------+----------------------------------
    Reporter:  simonpj                   |        Owner:                  
        Type:  run-time performance bug  |       Status:  new             
    Priority:  high                      |    Milestone:  6.12.2          
   Component:  libraries (other)         |      Version:  6.10.4          
    Severity:  normal                    |   Resolution:                  
    Keywords:                            |   Difficulty:  Unknown         
    Testcase:                            |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple          |  
-----------------------------------------+----------------------------------
Comment (by int-e):

 Replying to [comment:12 simonpj]:
 > Both versions yield identical code. So why do you think one is better
 than t'other?

 I'm afraid I must have imagined that. In any case, I'm unable to reproduce
 my measurements although I remember a distinct decrease in runtime with a
 variant of dons' testcase, from 0.090 to 0.060 seconds, with multiple
 measurements. Perhaps I mixed up user and total execution time? Oh well.

 So that part of the patch should be left out.

 On to more serious matters - the explicitely inlined worker trick works
 for ghc 6.10.4, but is not sufficient for the 6.12 RC, so that will need a
 different fix. One idea that works is to add
 {{{
 newArray = newArrayImpl
 }}}
 to all {{{MArray (STUArray ...) ...}}} instances. Of course getting
 inlining for default methods to work would be preferable. In fact, for
 default method it would be nice to have a special form of the SPECIALIZE
 pragma as well, one that duplicates the definition for all instances and
 optimizes it in that context.

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