| From: | David Rowley <drowley(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Always inline SeqNext and SeqRecheck |
| Date: | 2026-01-26 01:29:53 |
| Message-ID: | E1vkBQP-002eNj-0D@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Always inline SeqNext and SeqRecheck
The intention of the work done in fb9f95502 was that these functions are
inlined. I noticed my compiler isn't doing this on -O2 (gcc version
15.2.0). Also, clang version 20.1.8 isn't inlining either. Fix by
marking both of these functions as pg_attribute_always_inline to avoid
leaving this up to the compiler's heuristics.
A quick test with a Seq Scan on a table with a single int column running
a query that filters all 1 million rows in the WHERE clause yields a
3.9% speedup on my Zen4 machine.
Author: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAApHDvrL7Q41B=gv+3wc8+AJGKZugGegUbBo8FPQ+3+NGTPb+w@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/83a53572a6fc9f83276d24d8c2747b3d5ce49440
Modified Files
--------------
src/backend/executor/nodeSeqscan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-01-26 01:52:43 | pgsql: Remove PG_MMAP_FLAGS from mem.h |
| Previous Message | Michael Paquier | 2026-01-26 00:31:28 | pgsql: Add more tests with clause STORAGE on table and TOAST interactio |