[Haskell-cafe] haskell version of fractal benchmark

Donald Bruce Stewart dons at cse.unsw.edu.au
Sat Jun 9 02:32:49 EDT 2007


dons:
> sic:
> > * Andrew Coppin <andrewcoppin at btinternet.com> [070608 02:45]:
> > >    Bayley, Alistair wrote:
> > > 
> > > [[1]mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Andrew Coppin
> > > 
> > > Donald Bruce Stewart wrote:
> > > 
> > > Some things to remember using Doubles:
> > > 
> > >     * {-# OPTIONS -fexcess-precision #-}
> > >     * -fvia-C
> > >     * -fbang-patterns
> > >     * -optc-O2 -optc-mfpmath=sse -optc-msse2
> > >     * -optc-march=pentium4
> > > 
> > > 1. What do all those things do?
> > > 2. Is the effect actually that large?
> > > 
> > > Large? Depends what you mean by large, but adding a few flags to get
> > > just a 10-20% speedup isn't to be ignored:
> > > 
> > >    Sure - if it really is 10-20%. (And not, say, 0.001 - 0.002%.)
> > 
> > A single data point for all of this, I have a program that calculates:
> > 
> > P^1_i = S_i/sum_k S_k
> > P^m_i = sum_{k!=i} P^1_k*P^m-1_i(S_~k)
> > 
> > Here's timings for the different options:
> > 
> > options                  run time    compile time
> > none                      46.401       3.136
> > -O                         5.033       4.906
> > -O2                        4.967       6.755
> > -O2 -fexcess-precision     3.710       6.396
> > all listed options         3.602       6.344

My apologies. Misread that last line. 

/me drinks more tea.

-- Don


More information about the Haskell-Cafe mailing list