Opened 11 years ago

Closed 9 years ago

#2609 closed bug (fixed)

Compiling with -O2 is 7x slower than -O

Reported by: simonpj Owned by:
Priority: low Milestone: 7.0.1
Component: Compiler Version: 6.8.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:

Description

Serge writes that compiling DoCon with -O2 -fvia-C "does not gain more performance, but leads to 7 times longer compilation". That seems a big slow down, worth looking into.

The offending DoCon bundle is attached

Attachments (1)

docon-2.12-pre.tar.bz2 (237.8 KB) - added by simonpj 11 years ago.
DoCon 2.12 pre-release (for testing purposes)

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by simonpj

Attachment: docon-2.12-pre.tar.bz2 added

DoCon 2.12 pre-release (for testing purposes)

comment:1 Changed 11 years ago by simonpj

Ah, this seems to be to do with -fviaC not to do with -O2. Serge writes:

With -O2, the compile time is ok, but when I add -fvia-C, it takes 7 times longer -- this is for ghc-6.9-earlySeptember to compile DoCon-2.12-pre.

You do not control over the speed of gcc itself. But a small change in the GHC compiler may, in principle, lead to many times faster compilation by gcc of the code produced by GHC. This may occur some problem in GHC as well as some problem in gcc.

This is only my observation, I do not pretend for a bug report in this case. I tried -fvia-C for curiosity: "by occasion, would it increase the code performance?". If this ratio of 7 looks curious to you, you could investigate this.

And personally, I am satisfied with -O (without via-C).

comment:2 Changed 11 years ago by igloo

Milestone: 6.12 branch

comment:3 Changed 11 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 11 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 10 years ago by simonmar

Type of failure: Compile-time performance bug

comment:6 Changed 9 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:7 Changed 9 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:8 Changed 9 years ago by igloo

Resolution: fixed
Status: newclosed

-fvia-C is now deprecated.

Note: See TracTickets for help on using tickets.