
23 Feb
2006
23 Feb
'06
1:47 p.m.
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 :-). k