Hello Donald, Thursday, November 2, 2006, 2:21:31 PM, you wrote:
>> 10-20 times difference is typical for GHC programs. > It's really more like 2-4x. Sometimes better than C. > Where's this huge figure coming from Bulat? If you have code that > behaves like this, you should report it. are you analyzed the cases where performance is close or even better? i does. it's either because C version is limited by memory performance or just use different, less efficient algorithm the cases which shows slowness of ghc-generated code is factorial algorithm and the program attached. despite that Haskell code is far uglier, C version outperforms it 20 times. run both programs with arrays of about 10k elements to see the difference: a.out 10000 elements 100000 iterations in February i've written detailed explanation (in ghc-users) of why this comes and made some suggestions on improving it. of course, main problem is ghc's own code generator which is far away from gcc or even ocaml ones -- Best regards, Bulat mailto:[EMAIL PROTECTED]
full.c
Description: Binary data
newest.hs
Description: Binary data
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe