[GHC] #16256: -fexternal-interpreter slow for profiling with template haskell

GHC ghc-devs at haskell.org
Wed Jan 30 15:31:30 UTC 2019


#16256: -fexternal-interpreter slow for profiling with template haskell
-------------------------------------+-------------------------------------
           Reporter:  guibou         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I'm trying to build the following program (in `Foo.hs`) with profiling
 enabled:

 {{{#!haskell
 {-# LANGUAGE TemplateHaskell #-}
 main = print $([| 10 |])
 }}}

 With the "alternate object file suffix" method, I have correct build time:

 {{{
 $ time ghc -prof -osuf o_p Foo.hs
 [1 of 1] Compiling Main             ( Foo.hs, Foo.o_p )
 Linking Foo ...

 real    0m1.698s
 user    0m1.518s
 sys     0m0.184s
 }}}

 However with `-fexternal-interpreter`, times are abysmally slow:

 {{{
 $ time ghc -prof -fexternal-interpreter -osuf "p_o" Foo.hs
 [1 of 1] Compiling Main             ( Foo.hs, Foo.p_o )
 Linking Foo ...

 real    0m26.077s
 user    0m1.531s
 sys     0m0.190s
 }}}

 I'm using `ghc-8.6.3` on nixos.

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


More information about the ghc-tickets mailing list