
The static argument transformation is currently run only when –fstatic-argument-transformation is specified; i.e almost never. It has not received any love for some time. I note the following comment from Max Bolingbroke in DynFlags.hs -- , ([2], Opt_StaticArgumentTransformation) -- Max writes: I think it's probably best not to enable SAT with -O2 for the -- 6.10 release. The version of SAT in HEAD at the moment doesn't incorporate -- several improvements to the heuristics, and I'm concerned that without -- those changes SAT will interfere with some attempts to write "high -- performance Haskell", as we saw in some posts on Haskell-Cafe earlier -- this year. In particular, the version in HEAD lacks the tail call -- criterion, so many things that look like reasonable loops will be -- turned into functions with extra (unnecessary) thunk creation. I’m therefore reluctant to commit refactoring to SAT. They will, in effect, be entirely un-tested. There is a ticket here: https://ghc.haskell.org/trac/ghc/ticket/9374 Do by all means add your diffs to it, so that if anyone (possibly even you) picks it up they will get the benefit of your work. Simon From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of David Feuer Sent: 07 September 2014 04:06 To: ghc-devs Subject: Trying to fix an efficiency issue noted in a TODO in SAT.hs compiler/simplCore/SAT.hs has a TODO comment about the fact that it does a fair bit of appending onto the ends of lists, and that should be done differently. I made an attempt to fix it. The complexity of the recursion, however, leaves me uncertain as to whether I really did or not. I've attached a diff and I hope someone will be able to take a look at it. The only use of Sequence.fromList is source line 172, and the only significant use of Foldable.toList (aside from pretty-printing) is on source line 402. Note that the use of Sequence may be temporary—I want to get the right code structure down before choosing the best data structure. Thanks, David Feuer