
20 Feb
2009
20 Feb
'09
6:07 p.m.
On Friday 20 February 2009 16:29:29 Bulat Ziganshin wrote:
Hello haskell-cafe,
since there are no objective tests comparing ghc to gcc, i made my own one. these are 3 programs, calculating sum in c++ and haskell:
main = print $ sum[1..10^9::Int]
... skipped ...
The discussion is mostly about low level optimizations such as loop unrolling etc. I have another question. Why shouldn't compiler realize that `sum [1..10^9]' is constant and thus evaluate it at compile time? -- Khudakov Alexey