[GHC] #10678: integer-gmp's runS seems unnecessarily expensive

GHC ghc-devs at haskell.org
Sun Jul 26 07:57:45 UTC 2015


#10678: integer-gmp's runS seems unnecessarily expensive
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
  (CodeGen)                          |
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 I am working on a patch that adds such a `runRW#` function with special
 treatment in CorePrep, since it seems easy and most of the work could be
 reused for the special primop approach anyways. No benchmarks yet but it
 does produce the expected Cmm without the floating-out problems of
 `inlinePerformIO` in my simple test, and it passes validate (which might
 not greatly stress this case, but the new `runRW#` is being used from
 integer-gmp and I guess also from bytestring via
 `unsafeDupablePerformIO`).

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


More information about the ghc-tickets mailing list