Opened 22 months ago

Last modified 22 months ago

#14565 new bug

Performance degrades from -O1 to -O2

Reported by: dbeacham Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.2.2
Keywords: SpecConstr Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: #14379 Differential Rev(s):
Wiki Page:

Description (last modified by dbeacham)

GHC seems to get stuck at SpecConstr stage when compiling.

I've managed to get the example down to what appears to be minimal but making a number of minor changes makes the compilation go through quickly:

  • changing toIdx to const 0
  • removing one of the V.forM_ layers.
  • using "-fno-spec-constr" (unsuprisingly).

I can't reproduce it on 8.0.2.

In larger examples I was able to get memory and cpu to sky rocket quite quickly but I appear to have lost some of that behaviour when paring down the example.

Attachments (2)

Example.hs (783 bytes) - added by dbeacham 22 months ago.
Source file
minimal.cabal (267 bytes) - added by dbeacham 22 months ago.
cabal file

Download all attachments as: .zip

Change History (4)

Changed 22 months ago by dbeacham

Attachment: Example.hs added

Source file

Changed 22 months ago by dbeacham

Attachment: minimal.cabal added

cabal file

comment:1 Changed 22 months ago by dbeacham

Description: modified (diff)
Summary: Memory leak switching from -O1 to -O2Performance degrades from -O1 to -O2

comment:2 Changed 22 months ago by simonpj

Keywords: SpecConstr added
Note: See TracTickets for help on using tickets.