[fpc-devel] Sorting tests
Stefan Glienke
sglienke at dsharp.org
Tue Nov 29 15:52:07 CET 2022
Where exactly can that stable quicksort be found? rtl/inc/sortbase.pp
looks pretty much like standard quicksort to me.
Am 29.11.2022 um 11:08 schrieb Sven Barth via fpc-devel:
> J. Gareth Moreton via fpc-devel <fpc-devel at lists.freepascal.org>
> schrieb am Di., 29. Nov. 2022, 10:09:
>
> Surely that's a bug in the comparison functions that should be
> fixed and
> not something that can be blamed on introsort. If a comparison
> function
> is faulty, then pretty nuch any sorting algorithm can be
> considered to
> have unpredictable behaviour.
>
>
> This *can* be blamed on IntroSort, because Stability (order of equal
> elements is kept) is an attribute of sorting algorithms and IntroSort
> is *not* considered stable while QuickSort *can* be stable depending
> on the implementation and ours *is*.
>
> Regards,
> Sven
>
>
> _______________________________________________
> fpc-devel maillist -fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20221129/2dbf4433/attachment.htm>
More information about the fpc-devel
mailing list