Re: Re: Which qsort is used

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Luke Lonergan" <llonergan(at)greenplum(dot)com>, "Neil Conway" <neilc(at)samurai(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Which qsort is used
Date: 2005-12-17 06:15:00
Message-ID: D425483C2C5C9F49B5B7A41F8944154757D38B@postal.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Qingqing Zhou [mailto:zhouqq(at)cs(dot)toronto(dot)edu]
> Sent: Friday, December 16, 2005 10:13 PM
> To: Dann Corbit
> Cc: Tom Lane; Bruce Momjian; Luke Lonergan; Neil Conway; pgsql-
> hackers(at)postgresql(dot)org
> Subject: RE: [HACKERS] Re: Which qsort is used
>
>
>
> On Sat, 17 Dec 2005, Dann Corbit wrote:
>
> >
> > The benchmarks say that they (order checks) are a good idea on
average
> > for ordered data, random data, and partly ordered data.
> >
>
> I interpret that in linux, 5000000 seems a divide for qsortpdq. Before
> that number, it wins, after that, bsd wins more. On SunOS, qsortpdq
takes
> the lead till the last second -- I suspect this is due to the rand()
> function:
>
> Linux - #define RAND_MAX 2147483647
> SunOS - #define RAND_MAX 32767
>
> So in SunOS, the data actually not that scattered - so more favourate
for
> sorted() or reversed() check?

There is a lot of variability from system to system even for the same
tests. I see different results depending on whether I use GCC or Intel
or MS compilers.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-17 06:40:59 Re: Re: Which qsort is used
Previous Message Qingqing Zhou 2005-12-17 06:13:07 Re: Re: Which qsort is used