Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Performance loss due to eta expansion
Given the attached file, at both `-O2` and `-O0`, GHC translates the function: ```hs test1 [1,2,3,4,5,6,7,8,9,10] = \x -> x test1 _ = \x -> negate x ``` To be equivalent to: ```hs test0 [1,2,3,4,5,6,7,8,9,10] x = x test0 _ x = negate x ``` When applied in a loop with something like: ```hs map (test1 [1..]) [1..1000] ``` The eta-expanded variant is 3x slower. Adding a trace breaks that transformation, and then the code goes 3x faster. Specifically: ```hs test2 [1,2,3,4,5,6,7,8,9,10] = \x -> x test2 _ = trace "here" $ \x -> negate x ``` Timings, as reported by Criterion under O2 with GHC 7.10.2, are: ``` benchmarking test0 = 40.99 ns (40.96 ns .. 41.02 ns) benchmarking test1 = 41.09 ns (41.06 ns .. 41.14 ns) benchmarking test2 = 17.74 ns (17.68 ns .. 17.81 ns) ```
issue