Ticket #1600 (new task)

Opened 6 years ago

Last modified 5 months ago

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

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 years ago by igloo

  • milestone changed from 6.10 branch to 6.12 branch

Changed 4 years ago by simonpj

See also #2387 and #2289

Changed 4 years ago by PHO

  • cc pho@… added

Changed 4 years ago by simonmar

  • difficulty changed from Moderate (1 day) to Moderate (less than a day)

Changed 3 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.3

Changed 3 years ago by simonmar

  • failure set to Runtime performance bug

Changed 3 years ago by igloo

  • priority changed from normal to low
  • milestone changed from 6.12.3 to 6.14.1

Changed 2 years ago by igloo

  • milestone changed from 7.0.1 to 7.0.2

Changed 2 years ago by igloo

  • milestone changed from 7.0.2 to 7.2.1

Changed 21 months ago by igloo

  • milestone changed from 7.2.1 to 7.4.1

Changed 16 months ago by igloo

  • priority changed from low to lowest
  • milestone changed from 7.4.1 to 7.6.1

Changed 9 months ago by igloo

  • milestone changed from 7.6.1 to 7.6.2

Changed 5 months ago by morabbin

Time to revisit this optimization.

Is this more of feature request though?

Note: See TracTickets for help on using tickets.