Performance: Faster to define a function writing out all arguments?

Don Stewart dons at
Mon May 12 19:28:47 EDT 2008

> Hi Don.
> >Could you submit a minimal, complete grammar file, so
> >we can look at the generated code?
> After reducing and simplifying the grammar file to the minimum for my 
> sample input I can't see any difference in performance anymore. Due to 
> other code changes the difference is almost non-existent anymore even 
> before simplification. I blame laziness for my lack of intuition of what 
> is going on ;-)
> Anyway, as I am still wondering why ghc creates different code for
>   returnP a = return a
>   returnP = return

Ah, now I rember this coming up before. 

Simon, is this a CAF issue? Or did it trigger the -fno-state-hack case?

I've definitely run into the odd other case where point-freeing 
a bit of code messes with the complexity.

-- Don

More information about the Glasgow-haskell-users mailing list