Re: Which qsort is used - Mailing list pgsql-hackers

From Qingqing Zhou
Subject Re: Which qsort is used
Date
Msg-id Pine.LNX.4.58.0512122000040.3553@eon.cs
Whole thread Raw
In response to Re: Which qsort is used  ("Luke Lonergan" <llonergan@greenplum.com>)
Responses Re: Which qsort is used
List pgsql-hackers
On Mon, 12 Dec 2005, Luke Lonergan wrote:
>
> Do you have a test suite you can recommend with those edge cases?
>

I have at least those factors in mind:

+ f1: number of elements - in {10^3, 10^4, 10^5, 10^6, 10^7}

+ f2: key comparators measured by cpu cost - in {1, 10, 100+};

+ f3: data distribution - in {uniform, Gussian, 95% sorted, 95% reverse sorted}

+ f4: data value range - in {2, 32, 1024, unlimited}: radix sort might be better for small
range

The element size doesn't matter since the main usage of our qsort is
on pointer array. Element data type is covered by f2 and f4.

This will gives us a 5*3*4*4 = 240 tests ...

Regards,
Qingqing


pgsql-hackers by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: 7.3 failure on platypus
Next
From: Tom Lane
Date:
Subject: Re: Anyone for adding -fwrapv to our standard CFLAGS?