[GHC] #10678: integer-gmp's runS seems unnecessarily expensive
GHC
ghc-devs at haskell.org
Fri Aug 7 16:18:07 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 simonpj):
Interesting. DO do this less manually we would need two things:
* The expression `runRW e` has the CPR property if `e rw` has the nested
CPR property.
* That might lead us to w/w a function like `plusBigNat` which in turn
would lead to expressions like
{{{
case (runRW e) of BN# farr -> farr
}}}
we would need some kind of special case to push the `case` inside the
`runRW` to get
{{{
runRW (\s -> case e s of (# s', r #) ->
case r of BN# farr -> (# s', farr #)
}}}
That does not look too hard.
It'd be good to resurrect nested CPR (there's a ticket for that, #1600).
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10678#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list