Opened 9 years ago

Closed 8 years ago

#4849 closed bug (wontfix)

object code size fairly large for ghc-7.0.1 with optimization

Reported by: maeder Owned by: igloo
Priority: normal Milestone: 7.4.1
Component: Compiler Version: 7.0.1
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

The object code size for the file Isabelle/IsaParse.o increased from 291220 (for ghc-6.12.3) to 833736 bytes under x86 linux. (The container package version does not matter.)

Without optimization (via "cabal configure -O0") the object code size actually decreased from 177720 (for ghc-6.12.3) to 157432.

Attachments (3)

Isa-0.97.tar.gz (85.9 KB) - added by maeder 9 years ago.
parser sources
Parsec.hs (9.2 KB) - added by igloo 8 years ago.
IsaParse.hs (710 bytes) - added by igloo 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by maeder

Attachment: Isa-0.97.tar.gz added

parser sources

comment:1 Changed 9 years ago by igloo

Milestone: 7.0.3

Thanks for the report

comment:2 Changed 9 years ago by maeder

The above numbers assume the parsec-2.1.0.1 package being installed automatically. (The effect is less drastic with parsec-3.1.0 that goes just up to 505052 bytes.)

comment:3 Changed 9 years ago by igloo

Owner: set to igloo

comment:4 Changed 8 years ago by igloo

Milestone: 7.2.17.4.1

Changed 8 years ago by igloo

Attachment: Parsec.hs added

Changed 8 years ago by igloo

Attachment: IsaParse.hs added

comment:5 Changed 8 years ago by igloo

Resolution: wontfix
Status: newclosed

Parsec.hs + IsaParse.hs is a cutdown case.

I don't think there's anything actually wrong here, just changes in how inlining works. For example, in recent compilers, the

{-# INLINE parsecPlus   #-}

means that <|> gets inlined, which seems reasonable. You can make larger object files in 6.12 by marking the wrappers as INLINE, and smaller object files in more recent compilers by commenting out the INLINE pragmas. parsec would probably be better off either not marking the primitives INLINE, or by marking the wrappers NOINLINE.

Note: See TracTickets for help on using tickets.