Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)

From: Doug McNaught <doug(at)wireboard(dot)com>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Justin Clift <justin(at)postgresql(dot)org>, Mark kirkwood <markir(at)slingshot(dot)co(dot)nz>, PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)
Date: 2002-04-03 16:17:35
Message-ID: m3d6xg69k0.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

mlw <markw(at)mohawksoft(dot)com> writes:

> > Because qsort() is *supposed* to be optimized by the vendor for their
> > platform, perhaps even written in assembler. It makes sense to trust
> > the vendor except when their implementation is provably pessimized.
>
> Perhaps *supposed* to be optimized, but, in reality, are they? Is it a
> realistic expectation?

I think most vendors do a pretty good job. Don't forget, optimizing a
routine like that depends a lot on the cache size and behavior of the
CPU and other architecture-dependent stuff.

> qsort() is a great sort for very random data, when data is mostly in the
> correct order, it is very bad. Perhaps replacing it with an alternate sort
> would improve performance in general.

Actually, the C standard says nothing about what algorithm should be
used for qsort(); it's simply supposed to be a fast in-memory sort.
The qsort() name is just a historical artifact.

-Doug
--
Doug McNaught Wireboard Industries http://www.wireboard.com/

Custom software development, systems and network consulting.
Java PostgreSQL Enhydra Python Zope Perl Apache Linux BSD...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mlw 2002-04-03 16:24:18 Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)
Previous Message Andreas Scherbaum 2002-04-03 16:16:54 Re: Escaping in C-language functions

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2002-04-03 16:24:18 Re: [GENERAL] Re : Solaris Performance - Profiling (Solved)
Previous Message Tom Lane 2002-04-03 16:12:09 Re: Suggestions please: names for function cachability attributes