pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert uses of hash_string_pointer to fasthash equivalent
Date: Sat, 06 Apr 2024 05:21:21 +0000
Message-ID: <E1rsyUT-000l5f-1H@gemulon.postgresql.org> (raw)

Convert uses of hash_string_pointer to fasthash equivalent

Remove duplicate hash_string_pointer() function definitions by creating
a new inline function hash_string() for this purpose.

This has the added advantage of avoiding strlen() calls when doing hash
lookup. It's not clear how many of these are perfomance-sensitive
enough to benefit from that, but the simplification is worth it on
its own.

Reviewed by Jeff Davis

Discussion: https://postgr.es/m/CANWCAZbg_XeSeY0a_PqWmWqeRATvzTzUNYRLeT%2Bbzs%2BYQdC92g%40mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/bin/pg_combinebackup/load_manifest.c  | 16 ++--------------
src/bin/pg_dump/pg_dumpall.c              | 17 ++---------------
src/bin/pg_rewind/filemap.c               | 17 ++---------------
src/bin/pg_verifybackup/pg_verifybackup.c | 16 ++--------------
src/include/common/hashfn_unstable.h      | 20 ++++++++++++++++++++
5 files changed, 28 insertions(+), 58 deletions(-)



Message-ID: <E1rsyUT-000l5f-1H@gemulon.postgresql.org>
Permalink:  ../E1rsyUT-000l5f-1H@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rsyUT-000l5f-1H@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: john.naylor@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Convert uses of hash_string_pointer to fasthash equivalent
  In-Reply-To: <E1rsyUT-000l5f-1H@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