#6099: filepath library a lot bigger in 7.4.2 RC 1
---------------------------------+------------------------------------------
    Reporter:  igloo             |       Owner:  pcapriotti      
        Type:  bug               |      Status:  new             
    Priority:  highest           |   Milestone:  7.4.2           
   Component:  Compiler          |     Version:  7.4.2-rc1       
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 Wait.  Are you saying that GHC was automatically inlining
 {{{
 readDriveLetter :: String -> Maybe (FilePath, FilePath)
 readDriveLetter (x:':':y:xs) | isLetter x && isPathSeparator y
                              = Just $ addSlash [x,':'] (y:xs)
 readDriveLetter (x:':':xs) | isLetter x = Just ([x,':'], xs)
 readDriveLetter _ = Nothing
 }}}
 and that this inlining (plus three other fns) led to '''doubling''' the
 size of the binary?  Wow. Maybe we should be more careful about inlining.

 Do you know why it makes such a big difference?  Are there a '''lot''' of
 calls to `readDriveLetter`?

 Can you make a small test case that demonstrates the unwanted inlining?
 (I assume inlining is happening that does not give a big pay-off.)

 I don't want people to have to add pragmas to suppress code bloat that
 gives no useful performance benefit.

 Simon

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