Re: [GHC] #5916: runST isn't free

#5916: runST isn't free -------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.6.2 Component: Compiler | Version: 7.4.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonmar): Replying to [comment:15 simonpj]:
Also it occurs to me that the C-- code for these two code fragments will be nearly identical {{{ (1) case st_rep s of (# _, r #) -> r (2) st_rep s }}} The latter will be a tail call; the former will push a return frame, call, and then simply return after that. So we could maybe code-gen (1) just like (2).
Not exactly: (1) evaluates `r`, but (2) doesn't. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/5916#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC