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

 okay, I tried it today with -O [*] (compiler: 6.9.20080619, a stage1
 compiled by 6.8.2) and it succeeded after two hours, using up to 738 MB
 RAM.  So it's "only" 40 times slower optimizing than the already-slow not-
 optimizing case. [*] First I tried compiling all the modules of GHC that
 Lexer.hs depends on, with -O0, then compiling Lexer.hs with -O; then I
 tried again compiling the dependent modules with -O too, and the compile
 time (not including dependent modules) of Lexer.hs was only a few minutes
 longer with a few more megabytes used.

 I avoided ghc --make for testing because that might have an additional
 risk of wasted memory that I'm not trying to test.

 P.S. is there a way to get a correct build order other than string-
 processing on the output of ghc --make?  I tried ghc -M but that gave a
 makefile format and the modules weren't textually in the necessary order.

 Anyway, I'm attaching a test-case extracted from the GHC source but hacked
 so it doesn't need to go through the configure process (since it suffers
 the same slowness being compiled).. use e.g.
 {{{
 ./build_deps path_to_ghc -O
 ./build_lexer path_to_ghc -O
 }}}
 oh wait, trac won't let me attach that big a file (half a megabyte), so
 here it is: http://isaac.cedarswampstudios.org/2008/ghc_x_slowness.tar.gz

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