summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
authorRobert Haas2012-02-15 17:13:32 +0000
committerRobert Haas2012-02-15 17:13:32 +0000
commit337b6f5ecf05b21b5e997986884d097d60e4e3d0 (patch)
tree09343650efe3ba295c204c421e71294b20c6a1e6 /src/port
parentac9100f8cf595f7512e98fc5c6338ee3e32a0651 (diff)
Speed up in-memory tuplesorting.
Per recent work by Peter Geoghegan, it's significantly faster to tuplesort on a single sortkey if ApplySortComparator is inlined into quicksort rather reached via a function pointer. It's also faster in general to have a version of quicksort which is specialized for sorting SortTuple objects rather than objects of arbitrary size and type. This requires a couple of additional copies of the quicksort logic, which in this patch are generate using a Perl script. There might be some benefit in adding further specializations here too, but thus far it's not clear that those gains are worth their weight in code footprint.
Diffstat (limited to 'src/port')
-rw-r--r--src/port/qsort.c2
-rw-r--r--src/port/qsort_arg.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/port/qsort.c b/src/port/qsort.c
index 8e2c6d92c2..49d8fa7ab6 100644
--- a/src/port/qsort.c
+++ b/src/port/qsort.c
@@ -7,7 +7,7 @@
* Remove ill-considered "swap_cnt" switch to insertion sort,
* in favor of a simple check for presorted input.
*
- * CAUTION: if you change this file, see also qsort_arg.c
+ * CAUTION: if you change this file, see also qsort_arg.c, gen_qsort_tuple.pl
*
* src/port/qsort.c
*/
diff --git a/src/port/qsort_arg.c b/src/port/qsort_arg.c
index 28d1894992..3091eb09ea 100644
--- a/src/port/qsort_arg.c
+++ b/src/port/qsort_arg.c
@@ -7,7 +7,7 @@
* Remove ill-considered "swap_cnt" switch to insertion sort,
* in favor of a simple check for presorted input.
*
- * CAUTION: if you change this file, see also qsort.c
+ * CAUTION: if you change this file, see also qsort.c, gen_qsort_tuple.pl
*
* src/port/qsort_arg.c
*/