| From: | mlw <markw(at)mohawksoft(dot)com> |
|---|---|
| To: | Doug McNaught <doug(at)wireboard(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:24:18 |
| Message-ID: | 3CAB2CB2.1745AC2F@mohawksoft.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers |
Doug McNaught wrote:
> 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.
Perhaps so, but maybe that is the issue with Solaris, it actually may use qsort
algorithm.
I am not too sure how one would optimize the qsort() API on a platform basis.
The sorting algorithm uses a callback function, this precludes any meaningful
optimization. Yea, you can play with memory page sizes, and so on, but you
still have to do a function call for some multiple of the number of elements in
the array.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-04-03 16:25:15 | Re: [GENERAL] Re : Solaris Performance - Profiling (Solved) |
| Previous Message | Doug McNaught | 2002-04-03 16:17:35 | Re: [GENERAL] Re : Solaris Performance - Profiling (Solved) |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-04-03 16:25:15 | Re: [GENERAL] Re : Solaris Performance - Profiling (Solved) |
| Previous Message | Doug McNaught | 2002-04-03 16:17:35 | Re: [GENERAL] Re : Solaris Performance - Profiling (Solved) |