inside the GHC code generator
glynn at info.ucl.ac.be
Thu Feb 23 13:47:37 EST 2006
Bulat Ziganshin writes:
> Hello Kevin,
> KG> Also, ghc used to be faster than gcc for a naive, recursive factorial
> KG> function (once the cpr analysis and optimisation was added). From
> KG> what Bulat wrote it seems that gcc got better ...
> i don't say that we must compile recursive Haskell/STG functions
> naively to recursive C ones (as jhc does). no - i say that we should
> translate recursive Haskell definitions to explicit C loops, what is
> NATURAL C PROGRAMMING STYLE and therefore optimized much better as you
> can see in the files i attached
Ahhh, OK. I misunderstood. I don't claim ghc beat a C loop. ghc was
just more optimised at making function calls :-).
More information about the Glasgow-haskell-users