Opened 3 years ago

Last modified 3 years ago

#12032 new bug

Performance regression with large numbers of equation-style decls

Reported by: tommd Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.10.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


See the attached for a slice of code taken from Crypto-API that demonstrates a 2x regression in GHC compile times using -O2 (from 6.12.x to 7.10.x).

Attachments (1)

regression-cpoly.hs (938 bytes) - added by tommd 3 years ago.
A slice of crypto-api that shows performance regression in GHC

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by tommd

Attachment: regression-cpoly.hs added

A slice of crypto-api that shows performance regression in GHC

comment:1 Changed 3 years ago by simonpj

Type of failure: None/UnknownCompile-time performance bug

comment:2 Changed 3 years ago by tommd

Things have improves since 7.10.x but are still behind 6.12.x:

vagrant@debian-jessie:~$ time ghc-6.12.3 -O2 -c -fforce-recomp regression-cpoly.hs

real    0m0.069s
user    0m0.056s
sys     0m0.004s
vagrant@debian-jessie:~$ time ghc-7.10.3 -O2 -c -fforce-recomp regression-cpoly.hs

real    0m0.498s
user    0m0.160s
sys     0m0.064s
vagrant@debian-jessie:~$ time ghc- -O2 -c -fforce-recomp regression-cpoly.hs

real    0m0.225s
user    0m0.196s
sys     0m0.028s

comment:3 Changed 3 years ago by bgamari

It looks like things initially regressed in 7.8, got much worse in 7.10, then recovered a bit in 8.0. Perhaps unsurprisingly most of the time is spent in renaming and typechecking on 8.0.1. Unfortunately, compile times are very short so it is very difficult to do reliable measurements. My suspicion here is that we have a constant factor regression which will be rather tricky to track down.

Note: See TracTickets for help on using tickets.