[GHC] #14031: Linker paths carry substantial N*M overhead when many libaries are used

GHC ghc-devs at haskell.org
Tue Jul 25 22:38:48 UTC 2017


#14031: Linker paths carry substantial N*M overhead when many libaries are used
-------------------------------------+-------------------------------------
        Reporter:  nh2               |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11587            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nh2):

 I forgot to mention, `gold` has an optimisation that trades the `stat()`
 against reading the directory contents; this makes it much faster at the
 problem and theoretically avoids the `N * M` complexity.

 However, it's not an all-round solution because it can be slower when the
 directories are very large / contain files we don't care about -- we'd
 read those only to throw them away. So it's essentially changing the the
 problem into `N * (number of total files in each N)`.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14031#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list