public inbox for [email protected]  
help / color / mirror / Atom feed
From: lakshmi <[email protected]>
To: Ranier Vilela <[email protected]>
Cc: Bryan Green <[email protected]>
Cc: Pg Hackers <[email protected]>
Subject: Re: Avoid multiple calls to memcpy (src/backend/access/index/genam.c)
Date: Wed, 25 Mar 2026 16:59:35 +0530
Message-ID: <CAEvyyTgcuGXmMoG0bBy85crZ2TROodRoeg=b6jzQxTprGsNm1Q@mail.gmail.com> (raw)
In-Reply-To: <CAEudQArStWAwxLM6ORNo2YtJ=Uw-MNRv9B-k_gQ6O=yt=7GtAA@mail.gmail.com>
References: <CAEudQApbWon+3Eb9x4WW_D-JkSt2mvfx99dXu9VZ4AeCuTh=fw@mail.gmail.com>
	<CAEudQApEfvhNT1fEPURzVcQH7G0A1ukh_ugoCGaErV6_dbndCQ@mail.gmail.com>
	<CAF+pBj_RS2KErTqQ6ORXjhVzmukG7Ve0wHU1Kq56xjJfFKwVqA@mail.gmail.com>
	<CAEudQAptRymgvmd5hQb2mk-Ft89XcSo_xvC74kv4JBA9v=D4Sg@mail.gmail.com>
	<CAF+pBj-K2bgNQRc9ih01WFmAWUaQtVbS37jLtYdYh5LOwOkF6A@mail.gmail.com>
	<CAF+pBj9M8rCoS-EEBwLiA6hdxm_UNjxMXG9Vc4RU8xifqnQB-g@mail.gmail.com>
	<CAEvyyTjLYVuy0V6gXE9_HgyB4gUftuTZm65gdbacE_OOKk1cqw@mail.gmail.com>
	<CAEudQAoF2xfpA7tgW3gusg0dyMTwTDDwAzBqR_bbv08NBkqv-A@mail.gmail.com>
	<CAEvyyTjT70OVN_NCcHQ+PodVM7bkPccKPzJcAv0u+eW=qpZDMg@mail.gmail.com>
	<CAEudQArStWAwxLM6ORNo2YtJ=Uw-MNRv9B-k_gQ6O=yt=7GtAA@mail.gmail.com>

> Hi,
>>
>> Thanks for the suggestion and for the earlier discussion.
>>
> Could you repeat the tests without enable-debug?
>
I repeated the tests using a non-debug (optimized) build of PostgreSQL
(19devel), built without --enable-debug.

Test setup:

   -

   Debian Linux (x86_64)
   -

   gcc 12.2.0
   -

   AMD Ryzen 5 7535U (6 cores / 12 threads)
   -

   pgbench scale factor 1
   -

   command: pgbench -p 55432 -d postgres -c 10 -j 4 -T 60 I ran multiple
   iterations for both the original and patched versions and considered the
   stable runs (excluding those affected by checkpoints).

   Results:

   Original:
   TPS: ~1047
   Latency: ~9.5 ms

   Patched:
   TPS: ~1040
   Latency: ~9.6 ms

   From these runs, the results are quite close, and I didn’t observe a
   consistent performance improvement with the patch under this workload. The
   differences appear to be within normal run-to-run variation.

   It may be that this change has limited impact in typical cases where the
   number of keys is small. It would be interesting to see how it behaves with
   workloads involving larger numbers of keys or different access patterns.

   Please let me know if you’d like me to try any additional scenarios.

   Regards,
   Lakshmi


view thread (17+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Avoid multiple calls to memcpy (src/backend/access/index/genam.c)
  In-Reply-To: <CAEvyyTgcuGXmMoG0bBy85crZ2TROodRoeg=b6jzQxTprGsNm1Q@mail.gmail.com>

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

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