
Hello Kevin, Thursday, February 23, 2006, 9:06:25 PM, you wrote: KG> On a related point, Mercury has two C backends a low level one at the KG> level of GHC's and a high level one. Bulat might want to read this for KG> a description of the high level C implementation: KG> KG> http://www.cs.mu.oz.au/research/mercury/information/papers.html#hlc_cc citating from this paper's annotation: "Many logic programming implementations compile to C, but they compile to very low-level C, and thus discard many of the advantages of compiling to a high-level language". it's the same as i think 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 -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com