Re: Which qsort is used

From: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
To: Luke Lonergan <llonergan(at)greenplum(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Which qsort is used
Date: 2005-12-13 01:08:47
Message-ID: Pine.LNX.4.58.0512122000040.3553@eon.cs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-13 01:14:11 Re: Anyone for adding -fwrapv to our standard CFLAGS?
Previous Message Michael Fuhr 2005-12-13 01:07:51 Re: How much expensive are row level statistics?