Opened 5 years ago

Closed 2 years ago

#9797 closed task (wontfix)

Investigate rewriting `>>=` to `*>` or `>>` for appropriate types

Reported by: dfeuer Owned by: dfeuer
Priority: normal Milestone:
Component: Core Libraries Version: 7.9
Keywords: Cc: core-libraries-committee@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

When we see m >>= (\_ -> n) with a type that admits an optimized >> or <$, we should try to take advantage of that. I don't currently know if this applies to any types under "GHC HQ" control.

Change History (7)

comment:1 Changed 5 years ago by ekmett

The danger with this proposal of course occurs when users have

m >> n = m >>= \_ -> n

comment:2 in reply to:  1 Changed 5 years ago by dfeuer

Replying to ekmett:

The danger with this proposal of course occurs when users have

m >> n = m >>= \_ -> n

There is no danger, because the rules would only apply to specified types. The main question is how likely it is that we'll be able to work around inlining in various situations.

comment:3 Changed 5 years ago by ekmett

Ah. I misread your proposal. Doing it 'pointwise' on a case by case basis like that is fine.

comment:4 Changed 5 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:5 Changed 4 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:6 Changed 4 years ago by thomie

Milestone: 8.0.1

comment:7 Changed 2 years ago by dfeuer

Resolution: wontfix
Status: newclosed

This seems likely to be much more trouble than it's worth, especially since the types in question seem likely to be internal compiler bits and trying to match on lambdas doesn't seem like the greatest way to make friends and influence people.

Note: See TracTickets for help on using tickets.