
#13001: EnumFromThenTo is is not a good producer -------------------------------------+------------------------------------- Reporter: George | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Runtime | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by akio): I tested a [https://github.com/takano- akio/ghc/commit/930d42755e6753ba695157b96b8d651263b1934c a patch] and indeed marking `*FB` functions `INLINE[0]` seems to help. However this change increases binary sizes of some programs in nofib: {{{ -------------------------------------------------------------------------------- Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- gen_regexps -0.3% 0.0% 0.000 0.000 0.0% puzzle +0.8% 0.0% 0.089 0.090 0.0% reptile +0.8% -0.0% 0.008 0.008 0.0% -------------------------------------------------------------------------------- Min -0.3% -0.0% -7.3% -7.1% 0.0% Max +0.8% +0.0% +7.8% +7.7% +1.8% Geometric Mean +0.0% -0.0% +0.2% +0.2% +0.0% }}} I have only looked at the code for `puzzle` so far. The increase in the code size seems to come from inlining `efdtInt*FB` into a derived `Enum` instance declaration. I wonder if this change is acceptable. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13001#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler