[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] speed: ghc vs gcc
From:       Khudyakov Alexey <alexey.skladnoy () gmail ! com>
Date:       2009-02-20 23:07:39
Message-ID: 200902210207.39066.alexey.skladnoy () gmail ! com
[Download RAW message or body]

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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic