[fpc-devel] Sorting tests
J. Gareth Moreton
gareth at moreton-family.com
Fri Nov 25 13:48:47 CET 2022
These are nice but don't actually use the code in rtl/inc/sortbase.pp -
maybe they can be adapted though.
Kit
On 25/11/2022 10:10, Marco Borsari via fpc-devel wrote:
> On Thu, 24 Nov 2022 18:51:12 +0000
> "J. Gareth Moreton via fpc-devel" <fpc-devel at lists.freepascal.org> wrote:
>
>> Hi everyone,
>>
>> I just need to touch on the knowledge base. What tests exist that test
>> the functionality of rtl/inc/sortbase.pp? As Olly suggested, I'm
>> looking at creating Introsort for this unit as well, but I need to know
>> if such a unit already exists or if I need to make my own.
> Some times ago I wrote a couple of merge sort routines to use in BWT,
> the project never goes further so they remain at level of numerical
> values input only.
> They should have a good worst case scenario.
> In the merge.pas the parameter nrm has to be false when the dimension
> of the array is not a power of two.
> There also is a check head-tail of the blocks to move in a single pass
> the smaller one.
> The natural.pas is recursive in the initial division in blocks and allow
> for adaptation for inputs already sorted.
> If you find them useful, you are free to made anything you want.
> Marco
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list