[Haskell-cafe] Re: Haskell vs Ruby as a scripting language

Donald Bruce Stewart dons at cse.unsw.edu.au
Wed Feb 21 07:05:41 EST 2007


simonmarhaskell:
> Neil Mitchell wrote:
> >Hi Simon
> >
> >>Benchmarks please!  Let's see some comparisons on the nofib suite.  If 
> >>there's a
> >>factor of 2 or less between GHC -O2 and YHC for any of the nofib 
> >>programs,  I'll
> >>eat my keyboard for lunch :-)
> >
> >http://www.cse.unsw.edu.au/~dons/nobench/bench.results
> >
> >Test: pidigits (lazy, arbitrary precision integers)
> >http://www.cse.unsw.edu.au/~dons/code/nobench/imaginary/pidigits
> >ghc                  3.200    seconds            (1.0 x)
> >ghci                 3.500    seconds            (1.1 x)
> >ghc-old              3.600    seconds            (1.1 x)
> >yhc                  5.740    seconds            (1.8 x)
> >
> >Would you like ketchup with that? ;)
> 
> pidigits is not (currently) one of the nofib programs (phew :-).  I suppose 
> the reason for the results is because the test spends most of its time in 
> GMP?

Right. If you look at the shootout, it really is a gmp bottleneck.
  
> There are some other odd results in nobench, like the 2 programs where Hugs 
> beats GHC that we need to look into.

Hugs only wins on one, atom,

                        ghc     hugs
    spectral    atom    3.52    0.55

this entry says in the src that hugs has historically beaten ghc here
(by up to 20x in the past.

>From the src:

        It has the interesting property that Classic Hugs 
        runs it 20x faster than GHC!
        Reason: runExperiment calls itself with identical parameters,
                and Hugs commons that up for some reason.

        (Even with that fixed, STG Hugs ran the program a lot
        slower than Classic Hugs.)

        So it seems like an interesting program.  It appears here
        in the form with the silly self-call, because that makes
        it run a nice long time.  It thrashes floating point
        multiplication and lists.

The 'constraints' entry is also interesting, in that hbc is a fair bit
faster there.

The two where nhc98 wins are due to nhc98 producing the wrong output.
The testsuite doesn't diff the output yet..

Another interesting one is  clausify, which has a heap oflow in 6.6, but
runs fine in 6.4.2.  Generally things look pretty good. The Hbc (and possibly
Hacle/Clean) results might indicate some areas to look at more closely.
        
-- Don


More information about the Haskell-Cafe mailing list