On 28-Sep-1999, S.D.Mechveliani <[EMAIL PROTECTED]> wrote:
> Fergus Henderson <[EMAIL PROTECTED]> writes
> > On 28-Sep-1999, S.D.Mechveliani <[EMAIL PROTECTED]> wrote:
> >> And now the performance ratio shows * 16 *.
> >>
> >> I understand this so, that this particular task allows to set
> >> `const'. Because first, condition1, condition2 apply to the
> >> vector x; as they do not modify x, next_permutation(x)
> >> yields the correct value when applied after them.
> >>
> >> Probably, other tasks and `condition1' variants would not allow to
> >> set `const' like here.
> >> Do i understand right?
> >> And for these cases the ratio is smaller, say, 6, as showed the
> >> earlier test - ?
...
> Now, if i reformulate my last assertion `>> .. '
> replacing `const' with `&' will it be true?
The bit up to "Do I understand right?" will be true.
But the comment about the ratio being smaller will probably not be,
because the conditions when pass-by-value must be used are when
the routine makes internal use of destructive update, and in precisely
those cases the routine is likely to be significantly more efficient
than the Haskell equivalent.
But of course the ratio will vary significantly from benchmark to benchmark.
--
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.