On 18-Sep-1999, Herbert Graeber <[EMAIL PROTECTED]> wrote:
> After following the discussion I am not sure if the comparison is fair:
...
> Second, the C++ algorithm presented uses a permutation generator from the
> C++ standard library. The times can only be compared, if both programs - the
> C++  version and the Haskell version - use the same algorithm.

I think it is useful to compare the performance of idiomatic Haskell code
(Haskell code written using the common idioms that Haskell programmers
typically use) with idiomatic C++ code or idiomatic Mercury code.

This particular benchmark is not a good choice, since seemingly
inconsequential differences in algorithm can affect which order the search
space is searched in, and can hence drastically affect the benchmark result.
However, if we made the minor change of finding all solutions rather than
finding the first solution, it would eliminate that problem.

> A fair comparison should include the best algorithm suitable for each
> language

I don't think that's the only kind of fair comparison possible.
I think comparing the easiest-to-implement or most idiomatic
algorithm for each language may give useful insights.

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]        |     -- the last words of T. S. Garp.


Reply via email to