[Haskell-cafe] Haskell performance question
Xiao-Yong Jin
xj2106 at columbia.edu
Thu Nov 8 17:23:49 EST 2007
Don Stewart <dons at galois.com> writes:
> Can you start by retrying with flags from the spectral-norm benchmark:
>
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=spectralnorm&lang=ghc&id=0
>
> The interaction with gcc here is quite important, so forcing -fvia-C
> will matter.
Clearly things has been changed, since the release of ghc-6.8.1. I tried them
with my laptop, and here are the results of N=3000.
C++ g++
=======
real 0m4.553s
user 0m4.551s
sys 0m0.002s
changed one option: -march=nocona
Haskell GHC
===========
real 0m34.392s
user 0m34.316s
sys 0m0.074s
I used `unsafePerformIO' with `INLINE', because I don't know
where `inlinePerformIO' is now. And also the `-optc-march'
is changed to `nocona'.
Haskell GHC #2
==============
real 0m20.069s
user 0m20.052s
sys 0m0.017s
The same label `Haskell GHC #2' on that web page. This is
the one without any optimisation. And it out performs the
previous heavily optimised one. Is it because I used
`unsafePerformIO' instead of the original `inlinePerformIO'?
`-optc-march' is also changed to `nocona'.
Is it only my laptop, or ghc-6.8.1 is indeed much faster
than 6.6.1 and the internal has changed so much that the old
optimisation no longer works?
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.1
$ gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2)
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.
Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz
Xiao-Yong
--
c/* __o/*
<\ * (__
*/\ <
More information about the Haskell-Cafe
mailing list