Opened 5 years ago

Closed 5 years ago

#9537 closed bug (fixed)

concatMap is not a good producer for list fusion

Reported by: dfeuer Owned by: ekmett
Priority: normal Milestone: 7.10.1
Component: Core Libraries Version: 7.9
Keywords: fusion Cc: hvr, ekmett, 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): Phab:D348
Wiki Page:

Description (last modified by dfeuer)

Joachim Breitner raised this issue in an email to haskell-cafe in 2011, but he never got a response. For some reason, list comprehensions desugar to concatMap forms written to fuse fully, but the actual concatMap function is not written so. Unless there is a good reason for this, we should make it fuse better.

Change History (5)

comment:1 Changed 5 years ago by thoughtpolice

Component: libraries/baseCore Libraries
Owner: set to ekmett

Moving over to new owning component 'Core Libraries'.

comment:2 Changed 5 years ago by thoughtpolice

Milestone: 7.8.47.10.1

Moving (in bulk) to 7.10.4

comment:3 Changed 5 years ago by dfeuer

Cc: core-libraries-committee@… added
Description: modified (diff)
Differential Rev(s): Phab:D348
Status: newpatch
Summary: concatMap does not participate in list fusionconcatMap is not a good producer for list fusion

comment:4 Changed 5 years ago by Austin Seipp <austin@…>

In 1e269bf404fb2719bbe8d72154156ef275c9a6f9/ghc:

Make Data.List.concatMap fuse better

Summary:
Fix #9537 precisely as Joachim Breitner proposed in
http://www.haskell.org/pipermail/haskell-cafe/2011-December/097228.html

Reviewers: austin, nomeata

Reviewed By: austin, nomeata

Subscribers: thomie, carter, ezyang, simonmar

Differential Revision: https://phabricator.haskell.org/D348

GHC Trac Issues: #9537

comment:5 Changed 5 years ago by nomeata

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.