On Tue, Oct 12, 2010 at 2:08 AM, Simon Marlow <[email protected]> wrote:

> Nothing has changed in this area that I'm aware of.  Could you give more
> details?
>

Sure. I'm building darcs HEAD of the text library using both 6.12.3 and 7:

darcs get http://code.haskell.org/text
cd text
cabal install --enable-library-profiling


It gets built with -prof -auto-all (see ghc-prof-opts in text.cabal).

If you then go into the tests/benchmarks directory, you can build and run
the Equality benchmark:

ghc -prof -auto-all -O --make Equality


(add -rtsopts if using 7)

Grab this sample file: http://www.facebook.com/jobs_puzzles/twl06.txt

Then run Equality on it:

time ./Equality text twl06.txt +RTS -P


I've attached samples of the .prof files generated by each version of GHC so
you can see the rather dramatic difference. To my eye, it looks like
something is quite wrong with the version from 7.
        Mon Oct 18 21:38 2010 Time and Allocation Profiling Report  (Final)

           Equality +RTS -P -RTS text /home/bos/Download/twl06.txt

        total time  =       10.76 secs   (538 ticks @ 20 ms)
        total alloc = 8,639,840,712 bytes  (excludes profiling overheads)

COST CENTRE                    MODULE               %time %alloc  ticks     
bytes

stream                         Data.Text.Fusion      58.9   77.8    317 
840142256
==_a2R5                        Data.Text.Fusion.Internal  11.0    0.0     59    
     0
==_aFRU                        Data.Text              9.7    0.0     52         0
text                           Main                   8.0    0.0     43    
227712
unsafeIndex                    Data.Text.Array        5.8    7.0     31  
76017314
unsafeChr                      Data.Text.UnsafeChar   3.5    7.0     19  
76017314
maxSize                        Data.Text.Fusion.Size   1.7    6.6      9  
71476400


                                                                                
               individual    inherited
COST CENTRE              MODULE                                               
no.    entries  %time %alloc   %time %alloc  ticks     bytes

MAIN                     MAIN                                                   
1           0   0.0    0.0   100.0  100.0      0       672
 main                    Main                                                 
334           1   0.0    0.0   100.0  100.0      0         0
  text                   Main                                                 
336           1   8.0    0.0   100.0  100.0     43   1821696
   ==_aFRU               Data.Text                                            
348    17869100   9.7    0.0    90.5   98.5     52         0
    ==_a2R5              Data.Text.Fusion.Internal                            
355    17869100  11.0    0.0    11.0    0.0     59         0
    stream               Data.Text.Fusion                                     
349    35738200  58.9   77.8    69.9   98.5    317 6721138048
     unsafeChr           Data.Text.UnsafeChar                                 
357    38008657   3.5    7.0     3.5    7.0     19 608138512
     unsafeIndex         Data.Text.Array                                      
356    38008657   5.8    7.0     5.8    7.0     31 608138512
     maxSize             Data.Text.Fusion.Size                                
354    35738200   1.7    6.6     1.7    6.6      9 571811200
   lines                 Data.Text                                            
346      178691   0.0    0.2     0.9    1.4      0  20013392
    unsafeTail           Data.Text.Unsafe                                     
358      178690   0.0    0.1     0.0    0.1      0   5718080
     iter_               Data.Text.Unsafe                                     
359      178690   0.0    0.0     0.0    0.0      0         0
    spanBy               Data.Text                                            
350      714763   0.6    0.4     0.9    1.2      3  31449600
     iter                Data.Text.Unsafe                                     
352     1763166   0.2    0.5     0.2    0.5      1  42315984
     textP               Data.Text.Internal                                   
351      357382   0.0    0.2     0.2    0.3      0  14295280
      text               Data.Text.Internal                                   
353      357381   0.2    0.1     0.2    0.1      1  11436192
    null                 Data.Text                                            
347      357382   0.0    0.0     0.0    0.0      0         0
   decodeUtf8            Data.Text.Encoding                                   
337           1   0.0    0.0     0.6    0.0      0         0
    decodeUtf8With       Data.Text.Encoding                                   
338           2   0.6    0.0     0.6    0.0      3        80
     textP               Data.Text.Internal                                   
344           1   0.0    0.0     0.0    0.0      0         0
      text               Data.Text.Internal                                   
345           1   0.0    0.0     0.0    0.0      0        32
     unsafeWrite         Data.Text.Array                                      
342     1763166   0.0    0.0     0.0    0.0      0         0
     validate1           Data.Text.Encoding.Utf8                              
341     1763166   0.0    0.0     0.0    0.0      0         0
     new                 Data.Text.Array                                      
340           1   0.0    0.0     0.0    0.0      0   3526368
     run2                Data.Text.Array                                      
339           2   0.0    0.0     0.0    0.0      0        56
      unsafeFreeze       Data.Text.Array                                      
343           2   0.0    0.0     0.0    0.0      0        56
 CAF                     Main                                                 
328           5   0.0    0.0     0.0    0.0      0        80
  main                   Main                                                 
335           0   0.0    0.0     0.0    0.0      0       656
 CAF                     Data.Typeable                                        
326           1   0.0    0.0     0.0    0.0      0       568
 CAF                     GHC.IO.Handle.FD                                     
266           2   0.0    0.0     0.0    0.0      0     29216
 CAF                     System.Posix.Internals                               
265           6   0.0    0.0     0.0    0.0      0       400
 CAF                     GHC.IO.FD                                            
250           6   0.0    0.0     0.0    0.0      0      1392
 CAF                     GHC.Conc                                             
249           1   0.0    0.0     0.0    0.0      0       696
 CAF                     GHC.IO.Handle.Internals                              
240           1   0.0    0.0     0.0    0.0      0        32
 CAF                     GHC.IO.Encoding.Iconv                                
234           6   0.0    0.0     0.0    0.0      0      1968
 CAF                     System.Environment                                   
228           2   0.0    0.0     0.0    0.0      0      1816
 CAF                     Data.Text.Array                                      
215           1   0.0    0.0     0.0    0.0      0        16
  empty                  Data.Text.Array                                      
364           1   0.0    0.0     0.0    0.0      0         0
   unsafeFreeze          Data.Text.Array                                      
366           1   0.0    0.0     0.0    0.0      0        16
   new                   Data.Text.Array                                      
365           1   0.0    0.0     0.0    0.0      0        32
 CAF                     Data.Text.Internal                                   
209           1   0.0    0.0     0.0    0.0      0        16
  empty                  Data.Text.Internal                                   
363           1   0.0    0.0     0.0    0.0      0        32
 CAF                     Data.Text                                            
196           1   0.0    0.0     0.0    0.0      0        16
        Mon Oct 18 21:17 2010 Time and Allocation Profiling Report  (Final)

           Equality +RTS -P -RTS text abaca 
../../../text/tests/benchmarks/twl06.txt

        total time  =        6.10 secs   (305 ticks @ 20 ms)
        total alloc = 5,135,970,352 bytes  (excludes profiling overheads)

COST CENTRE                    MODULE               %time %alloc  ticks     
bytes

text                           Main                 100.0  100.0    305 
5135959192


                                                                                
               individual    inherited
COST CENTRE              MODULE                                               
no.    entries  %time %alloc   %time %alloc  ticks     bytes

MAIN                     MAIN                                                   
1           0   0.0    0.0   100.0  100.0      0       720
 main                    Main                                                 
358           1   0.0    0.0   100.0  100.0      0      2560
  copyM                  Data.Text.Array                                      
363           1   0.0    0.0     0.0    0.0      0       192
  run2                   Data.Text.Array                                      
362           1   0.0    0.0     0.0    0.0      0        96
  text                   Main                                                 
360           2 100.0  100.0   100.0  100.0    305 5135959192
   run2                  Data.Text.Array                                      
361           1   0.0    0.0     0.0    0.0      0        64
 CAF                     Main                                                 
352           7   0.0    0.0     0.0    0.0      0       112
  main                   Main                                                 
359           0   0.0    0.0     0.0    0.0      0       528
 CAF                     Data.Typeable                                        
350           2   0.0    0.0     0.0    0.0      0       480
 CAF                     GHC.IO.Handle.FD                                     
289           2   0.0    0.0     0.0    0.0      0      2448
 CAF                     System.Posix.Internals                               
288           1   0.0    0.0     0.0    0.0      0        32
 CAF                     GHC.IO.FD                                            
273           6   0.0    0.0     0.0    0.0      0      1272
 CAF                     GHC.IO.Handle.Internals                              
253           1   0.0    0.0     0.0    0.0      0        32
 CAF                     GHC.IO.Encoding.Iconv                                
247           2   0.0    0.0     0.0    0.0      0      1952
 CAF                     GHC.Conc.Signal                                      
244           1   0.0    0.0     0.0    0.0      0       672
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to