[Lazarus] Sorting, mergesort and quicksort
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Aug 25 22:14:12 CEST 2009
On Tue, 25 Aug 2009 21:32:24 +0200
Marco van de Voort <marcov at stack.nl> wrote:
>[...]
> > Btw, there is a new kid in town: ParallelSort.
> > This uses a parallel mergesort and automatically uses several
> > threads. See here:
> > http://wiki.lazarus.freepascal.org/Parallel_procedures#Example:_parallel_sort
>
> Classically people used heapsort for lists that were possibly already
> sorted. It's inplace, but not stable and O(n*log(n)) iirc.
True, although heapsort jumps much more around than quick/mergesort, so
you get a lot of cache misses.
Mattias
More information about the Lazarus
mailing list