[Shootout-list] Rule 30

Jon Harrop jon@ffconsultancy.com
Sat, 21 May 2005 10:58:31 +0100


On Saturday 21 May 2005 10:43, John Skaller wrote:
> Yes of course, I did say 'entirely'. What I meant was that
> it still isn't "hard science", there's still scope for some
> debate as to whether there are enough -- or too few -- optimisation
> opportunities in a given benchmark for it to be both interesting
> and fair -- the dividing line between 'interesting' and 'fair'
> isn't as hard as one might like and never will be -- just that
> we can do better.

Yes. There are plenty of objective improvements that can be made before we get 
into this subjective territory though.

> > Most optimisations will be specialisations or
> > rearrangements, which is exactly what we should be testing as these are
> > the optimisations which speed up real programs.
>
> Yes, but by that argument the test for which Haskell is smart
> enough to eliminate all but one of the loops and thereby
> screams in ahead of everyone else .. is actually a perfectly
> valid test, and Haskell *deserves* one test that lets it
> do that. One could argue that -- I'm not actually making
> that argument, but if someone did I couldn't just dismiss it.

In theory, yes. In practice, I don't believe real programs will benefit from 
that particular optimisation. Indeed, that optimisation isn't performed 
explicitly by any compiler AFAIK. In the case of Haskell, it is simply a 
side-effect of laziness (pun intended ;-).

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists