#2002: problems with very large (list) literals
---------------------------------------------+------------------------------
    Reporter:  Isaac Dupree                  |        Owner:  simonmar
        Type:  compile-time performance bug  |       Status:  closed  
    Priority:  high                          |    Milestone:  6.10.2  
   Component:  Compiler                      |      Version:  6.8.2   
    Severity:  normal                        |   Resolution:  wontfix 
    Keywords:                                |   Difficulty:  Unknown 
    Testcase:                                |           Os:  Linux   
Architecture:  x86                           |  
---------------------------------------------+------------------------------
Changes (by simonmar):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 Tested today with GHC HEAD.  Compiling a 100k-element [Int] list takes
 just less than a minute with -O0, and needs up to 200M stack (I'll bump
 the default max stack size for GHC).  The profile looks like this:

 {{{
 SimplTopBinds                  SimplCore             44.9   27.5
 NativeCodeGen                  CodeOutput            13.7   12.4
 CoreTidy                       HscMain                9.6    8.2
 CorePrep                       HscMain                8.1    5.1
 CodeGen                        HscMain                7.5   12.7
 pprNativeCode                  AsmCodeGen             4.4   11.3
 }}}

 The object file was 22M, but I don't see any obvious ways to reduce that
 significantly - most of that size is the symbols.  There is one word per
 static `(:)` that we could eliminate by generating a special version of
 the `(:)` info table with CONSTR_STATIC_NOCAF; I'm not sure whether that's
 worthwhile in general.

 GHC needed 2.2G on this machine (x86_64/Linux).

 Bottom line: there's nothing obviously bad here.  The time and memory
 requirements increase roughly linearly with the length of the list,
 although we should bump the default max stack size.  The simplifier is the
 obvious place to look to start optimising.

 I didn't try compiling with -O, but I'm not at all surprised if it takes a
 lot longer - don't do that!

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