[Haskell-cafe] haskell version of fractal benchmark

Donald Bruce Stewart dons at cse.unsw.edu.au
Fri Jun 8 05:03:21 EDT 2007


andrewcoppin:
> 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?

Check the GHC user's guide.

> 2. Is the effect actually that large?

1) {-# OPTIONS -fexcess-precision #-

I've had this halved runtimes for runtimes for numeric-intensive programs.

2) -fvia-C

Probably still worth 10% for Double-based stuff (maybe more).

3) -fbang-patterns

Better than `seq`

4) -optc-O2 -optc-mfpmath=sse -optc-msse2 -optc-march=pentium4

Can be worth 0 to hmm, quite a few, percent, depending on the code.
This is all assuming you've written low level code anyway, so that the 
effects of, say, using SSE instructions are actually apparent.

-- Don


More information about the Haskell-Cafe mailing list