Avoid multiple calls to memcpy (src/backend/access/index/genam.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Avoid multiple calls to memcpy (src/backend/access/index/genam.c)
Date: 2026-03-09 13:16:20
Message-ID: CAEudQApbWon+3Eb9x4WW_D-JkSt2mvfx99dXu9VZ4AeCuTh=fw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

In the functions *systable_beginscan* and *systable_beginscan_ordered*,
is possible a small optimization.
The array *idxkey* can be constructed in one go with a single call to
mempcy.
The excess might not make much of a difference, but I think it's worth the
effort.

patch attached.

best regards,
Ranier Vilela

Attachment Content-Type Size
avoid-multiple-calls-to-memcpy-genam.patch application/octet-stream 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-03-09 13:25:18 Re: Simplifies checks (src/bin/pg_dump/pg_backup_archiver.c)
Previous Message Robert Haas 2026-03-09 13:08:08 Re: Consider low startup cost in add_partial_path