[jhc] Re: [Haskell] ANNOUNCE: jhc 0.6.0 Haskell Compiler
Don Stewart
dons at galois.com
Sat Mar 21 12:58:48 EDT 2009
sylvain.nahas:
> Hi,
>
> This compiler is very promising, for the least.
>
> Here is a small dummy Haskell program.
> countdown :: Int -> IO ()
> countdown 0 = putStrLn "finished"
> countdown x = do
> putStrLn (show x)
> countdown (x-1)
> main = countdown 10000000
>
> and the C program that comes to closest.
> #include <stdio.h>
> int main(void)
> {
> int i;
> for(i=0; i<10000000; i++)
> {
> printf("%d\n",i);
> }
> printf("finished\n");
> return 0;
> }
>
> GHC is 6.10.1, gcc is 4.3.2, jhc is 0.6.0
> arch is i386/Linux(Ubuntu)
>
> $ ghc hello.hs -o hello1
> $ jhc hello.hs -o hello2
> $ gcc hello.c -o hello3
Oh boy. Compile with optimizations on please! ghc -O2 et al.
More information about the jhc
mailing list