PG qsort vs. Solaris

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PG qsort vs. Solaris
Date: 2006-10-03 12:41:41
Message-ID: 45225A85.5020008@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Postgres has own implementation of qsort. It is used only for Solaris,
because in some cases Solaris implementation was terrible slow.

Now, New qsort is present in the Solaris from version 9 update 6 and I
performed some quick test and the speed is very similarly with pg
implementation see bellow. The Solaris qsort only does not have test for
preordered array.

Is it time to "remove" PG qsort and use libc version for solaris 9, 10...?

There some useful links:
solaris qsort implementation
http://cvs.opensolaris.org/source/xref/on/usr/src/common/util/qsort.c
discuss about qsort
http://momjian.postgresql.org/cgi-bin/pgtodo?qsort

Regards Zdenek

PS: Test program is located on
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4489885

There is test result:

mode 1 2 3 4 5 6 7 8
pg 3.440 54.259 42.251 40.967 38.214 29.730 21.668 39.142
pg2 39.492 53.598 44.697 40.546 38.027 29.572 21.598 38.756
solaris 41.207 41.957 41.873 41.616 35.895 29.502 26.906 39.492

Pg2 test is without sort array prechecking.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Benny Amorsen 2006-10-03 13:21:12 Re: Faster StrNCpy
Previous Message Zeugswetter Andreas DCP SD 2006-10-03 11:56:57 Re: Faster StrNCpy