[GHC] #15578: Honour INLINE pragmas on 0-arity bindings

GHC ghc-devs at haskell.org
Fri Sep 7 08:24:17 UTC 2018


#15578: Honour INLINE pragmas on 0-arity bindings
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15519            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by tdammers):

 I have `test3 src = runTokenParser testGrammar src`, is that equivalent?

 In any case, I'm getting good performance now with the patch applied as
 written. Given 3 binaries in the cwd, compiled with, unpatched and patched
 HEAD respectively (`test-HEAD` vs. `test-patched`), I get:

 {{{#!sh
 for TAG in HEAD patched; do for TEST in 0 1 3; do echo "$TAG / test$TEST";
 ./test-$TAG $TEST; done; done
 HEAD / test0
 387.417648
 HEAD / test1
 7769.65168
 HEAD / test3
 7769.16221
 patched / test0
 385.068842
 patched / test1
 370.170719
 patched / test3
 396.022899
 }}}

 So the patched version outperforms the unpatched one by a factor of about
 20 on the `test1` and `test3` test cases.

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


More information about the ghc-tickets mailing list