Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Memory prefetching while sequentially fetching from SortTuple array, tuplestore
Date: 2015-07-17 00:00:52
Message-ID: CAM3SWZRD25RHiLAGxyVdL_PL3wA57PyHzjbCwTWn2-XJLfxu6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 16, 2015 at 4:01 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> Attached patch adds a portable Postgres wrapper on the GCC intrinsic.
> It also adds a client within tuplesort.c -- a common function that
> seems like a good generic choke point. I can get a speed-up of 6% - 9%
> for all of these cases by prefetching a few SortTuples ahead, for the
> "tuple proper". (In-memory sorts only.)

I added a silly bug during last minute clean-up. I attach a V2.

--
Peter Geoghegan

Attachment Content-Type Size
v2-prefetch-from-memtuples-array-in-tuplesort.patch text/x-patch 8.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-07-17 00:05:31 Bugs in our qsort implementation
Previous Message Peter Geoghegan 2015-07-16 23:01:20 Memory prefetching while sequentially fetching from SortTuple array, tuplestore