[fpc-devel] Stringlist customsort

Bart bartjunk64 at gmail.com
Fri Nov 30 23:37:33 CET 2018


On Fri, Nov 30, 2018 at 2:29 PM Andrea Mauri <andrea.mauri.75 at gmail.com> wrote:

> if TStringList sort will be changed, please take into account the issue related to randomised pivot initialisation in TStringList sort and the consequences to Random sequence (http://forum.lazarus-ide.org/index.php?topic=43257.0).

https://en.wikipedia.org/wiki/Quicksort#Choice_of_pivot suggest to
either use a random value as pivot or the mean of the first, middle
and last element.

Bart



More information about the fpc-devel mailing list