pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify/speed up assertion cross-check in ginCompressPostingLis
Date: Sat, 07 Mar 2020 18:31:47 +0000
Message-ID: <E1jAeEl-0000lH-Mz@gemulon.postgresql.org> (raw)

Simplify/speed up assertion cross-check in ginCompressPostingList().

I noticed while testing some other stuff that the CHECK_ENCODING_ROUNDTRIP
logic in ginCompressPostingList could account for over 50% of the runtime
of an INSERT with a GIN index.  While that's not relevant to production
performance, it's still kind of annoying in a debug build.  Replacing
the loop around short memcmp's with one long memcmp works just as well
and is significantly faster, at least on my machine.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ea7dace2aa21e79a7a8eb23c493bcd2057d9bd7e

Modified Files
--------------
src/backend/access/gin/ginpostinglist.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)



Message-ID: <E1jAeEl-0000lH-Mz@gemulon.postgresql.org>
Permalink:  ../E1jAeEl-0000lH-Mz@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jAeEl-0000lH-Mz@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Simplify/speed up assertion cross-check in ginCompressPostingLis
  In-Reply-To: <E1jAeEl-0000lH-Mz@gemulon.postgresql.org>
  References: <E1jAeEl-0000lH-Mz@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox