#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):

 update: with my 2 GB RAM and 3 GB swap space, gcc took a long time
 swapping, but got in a good 2 minutes of CPU time according to `top` (cc1
 achieving about 80% of my RAM used at any one time, and between 0 and 50
 percent of my 2GHz CPU) before dying due to lack of virtual memory.

 Therefore, it seems that while there is a moderate performance issue with
 GHC through STG (2 minutes for a single file?), the assembly is the really
 difficult part: GCC needs an obscene amount of memory, and GHC's -fasm
 either needs an obscene or infinite amount of time.  But let me check back
 again... that might have been the optimizations and my cutting corners...

 {{{
 Makefile:1004: LIBRARY is libHSghc.a
 ../compiler/stage1/ghc-inplace -no-user-package-conf -H128m -O0 -fvia-C
 -istage2/utils  -istage2/basicTypes  -istage2/types  -istage2/hsSyn
 -istage2/prelude  -istage2/rename  -istage2/typecheck  -istage2/deSugar
 -istage2/coreSyn  -istage2/vectorise  -istage2/specialise
 -istage2/simplCore  -istage2/stranal  -istage2/stgSyn  -istage2/simplStg
 -istage2/codeGen  -istage2/main  -istage2/profiling  -istage2/parser
 -istage2/cprAnalysis  -istage2/iface  -istage2/cmm  -istage2/nativeGen
 -istage2/ghci -Wall -fno-warn-name-shadowing -fno-warn-orphans -Istage2
 -package hpc -package bytestring -DGHCI -package template-haskell
 -DGHCI_TABLES_NEXT_TO_CODE -I../libffi/build/include -cpp -fglasgow-exts
 -fno-generics -Rghc-timing -I. -Iparser -Iutil -package unix -package
 Cabal -ignore-package lang -recomp -Rghc-timing -O0 -fvia-C -DDEBUG -H16M
 '-#include "cutils.h"' -package-name  ghc-6.9.20080602   -fgenerics
 -funbox-strict-fields  -c parser/Lexer.hs -o stage2/parser/Lexer.o  -ohi
 stage2/parser/Lexer.hi
 Binary: expanding to size: 6144
 Binary: expanding to size: 6144
 Binary: expanding to size: 6144
 Binary: expanding to size: 6144
 virtual memory exhausted: Cannot allocate memory
 <<ghc: 25106288876 bytes, 47369 GCs, 25428014/262348800 avg/max bytes
 residency (89 samples), 612M in use, 0.00 INIT (0.00 elapsed), 61.75 MUT
 (1451.24 elapsed), 68.52 GC (69.86 elapsed) :ghc>>
 make: *** [stage2/parser/Lexer.o] Error 1
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2002#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to