pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use pg_memory_is_all_zeros() in PageIsVerifiedExtended()
Date: Mon, 18 Nov 2024 03:02:16 +0000
Message-ID: <E1tCs1o-002L8o-A2@gemulon.postgresql.org> (raw)

Use pg_memory_is_all_zeros() in PageIsVerifiedExtended()

Relying on pg_memory_is_all_zeros(), which would apply SIMD instructions
when dealing with an aligned page, is proving to be at least three times
faster than the original size_t-based comparisons when checking if a
BLCKSZ page is full of zeros.  Note that PageIsVerifiedExtended() is
called each time a page is read from disk, and making it faster is a
good thing.

Author: Bertrand Drouvot
Discussion: https://postgr.es/m/CAApHDvq7P-JgFhgtxUPqhavG-qSDVUhyWaEX9M8_MNorFEijZA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/03a42c9652f8cc2c447840e39418b862c48fd41d

Modified Files
--------------
src/backend/storage/page/bufpage.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)



Message-ID: <E1tCs1o-002L8o-A2@gemulon.postgresql.org>
Permalink:  ../E1tCs1o-002L8o-A2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tCs1o-002L8o-A2@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use pg_memory_is_all_zeros() in PageIsVerifiedExtended()
  In-Reply-To: <E1tCs1o-002L8o-A2@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