Ticket #1600 (new task)
Optimisation: CPR the results of IO
| Reported by: | simonmar | Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | 7.6.2 |
| Component: | Compiler | Version: | 6.6.1 |
| Keywords: | Cc: | pho@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Runtime performance bug | Difficulty: | Moderate (less than a day) |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
GHC currently cannot unbox the result of a function in the IO monad. For example:
facIO :: Int -> IO Int facIO n = if n < 2 then return 1 else do n' <- facIO (n-1); return (n*n')
the Int argument is unboxed fine, but not the result. It ought to be possible to do this: the CPR analysis needs to somehow look inside the unboxed pair returned by IO-monadic code.
Change History
Note: See
TracTickets for help on using
tickets.
