Ticket #2609 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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

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

Change History

Changed 5 years ago by simonpj

DoCon? 2.12 pre-release (for testing purposes)

Changed 5 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).

Changed 5 years ago by igloo

  • milestone set to 6.12 branch

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 years ago by simonmar

  • failure set to Compile-time performance bug

Changed 3 years ago by igloo

  • milestone changed from 6.12 branch to 6.12.3

Changed 3 years ago by igloo

  • priority changed from normal to low
  • milestone changed from 6.12.3 to 6.14.1

Changed 3 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

-fvia-C is now deprecated.

Note: See TracTickets for help on using tickets.