#7429: Unexplained performance boost with +RTS -h
    Reporter:  simonmar          |       Owner:                         
        Type:  bug               |      Status:  new                    
    Priority:  normal            |   Milestone:  7.8.1                  
   Component:  Compiler          |     Version:  7.6.1                  
    Keywords:                    |          Os:  Unknown/Multiple       
Architecture:  Unknown/Multiple  |     Failure:  Runtime performance bug
  Difficulty:  Unknown           |    Testcase:                         
   Blockedby:                    |    Blocking:                         
     Related:                    |  

Comment(by simonmar):

 I suspect it's a weird caching effect.  The program creates a small data
 structure and then repeatedly traverses it (if I'm understanding
 correctly). After a GC the program performs much better, which suggests
 that the GC has rearranged the data in memory in a more cache-friendly way
 (not deliberately, I should point out).  Or perhaps the data rearrangement
 has avoided some cache conflicts, but that seems unlikely - L1 caches are
 usually very associative.

 You should be able to get the same effect by adding a performGC after
 allocating the data structure but before traversing it.

Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7429#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

Glasgow-haskell-bugs mailing list

Reply via email to