Randomness in built-in .sort

Bill Baxter wbaxter at gmail.com
Tue Jan 6 14:07:14 PST 2009


On Wed, Jan 7, 2009 at 4:09 AM, Walter Bright
<newshound1 at digitalmars.com> wrote:
> Ary Borenszweig wrote:
>>
>> I think Bill speaks about a stable sort. You can have an unstable sort
>> algorithm without having explicity a random invocation. Note that he's
>> saying "leads to results that differ from run-to-run when there are elements
>> with identical keys".
>
> And I believe that the sort implementation is completely deterministic. If
> Bill is getting different results from different runs, something else is
> going on.
>

Really?  Hmm, I wonder what the reason was, then.  It did go away when
I switched to a different sort routine.
Don't have time to investigate right now, unfortunately.  But thank
you very much for the info that it should be deterministic.

--bb



More information about the Digitalmars-d mailing list