On Thu, Nov 08, 2007 at 07:57:23PM +0100, Thomas Schilling wrote: > > $ ghc --make -O2 ghc-bench.hs > > and got: > > $ time ./ghc-bench > 2.0e7 > > real 0m0.714s > user 0m0.576s > sys 0m0.132s > > $ time ./ghcbC > 20000000.000000 > > real 0m0.305s > user 0m0.164s > sys 0m0.132s > > This is on a first-gen Macbook running Ubuntu. 1GB RAM. 1.83Ghz Core > Duo > > $ ghc --version > The Glorious Glasgow Haskell Compilation System, version 6.8.0.20071019 > > $ gcc --version > gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4) > Copyright (C) 2006 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is > NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > $ gcc -O3 ghc-bench.c -o ghcbC > ghc-bench.c: In function ‘main’: > ghc-bench.c:16: warning: incompatible implicit declaration of built-in > function ‘printf’
-O3 is worse than -O0, DO NOT USE IT. I reported the bug several months ago. In the meantime, use -O2. (there are no high optimizations, it's just that the option parser misparses -O3) Stefan
signature.asc
Description: Digital signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe