Recursive functions and constant parameter closures
(inlining/strictness analyzer question)
simonpj at microsoft.com
Sun Jun 22 16:50:14 EDT 2008
| However, if I had to pick something out of the air, I'd say this: always do
| SAT when the argument in question is a function.
Yes, that might well be a good heuristic to try, if you are interested to pursue this, Max. Making the function static means that it may be inlined, and that can make a tremendous difference by specializing the loop for that particular function. But that in turn only tends to happen if the enclosing function is inlined. Consider foldr: the real payoff comes when foldr is inlined, so that the function at the call site becomes visible.
More information about the Glasgow-haskell-users