
Just to check, when you say that “I found it was an instance of…” do you mean “I compiled with –fno-state-hack as the only change, and it got faster again”? Otherwise how would you know this was the cause?
Simon
From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of David Spies
Sent: 07 December 2014 19:44
To: ghc-devs@haskell.org
Subject: Re: -O/-O2 causes program to run too slow
Ok, so I found that it was an instance of this: https://ghc.haskell.org/trac/ghc/ticket/1168
and I read through this whole thread: https://www.haskell.org/pipermail/glasgow-haskell-users/2008-February/014259...
I don't understand the state-hack optimization. It's clearly not safe and I'm not convinced that it actually is an optimization. In what circumstances does the state-hack identify a single-entry function that can't be identified as single-entry by some other (safe) method?
On Sun, Dec 7, 2014 at 10:52 AM, David Spies