pgsql: Speedup WindowAgg code by moving uncommon code out-of-line

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Speedup WindowAgg code by moving uncommon code out-of-line
Date: 2024-09-05 04:00:29
Message-ID: E1sm3fZ-000C2i-2p@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Speedup WindowAgg code by moving uncommon code out-of-line

The code to calculate the frame offsets is only performed once per scan.
Moving this code out of line gives a small (around 4-5%) speedup when testing
with some CPUs. Other tested CPUs are indifferent to the change.

Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Reviewed-by: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Discussion: https://postgr.es/m/CAApHDvqPgFtwme2Zyf75BpMLwYr2mnUstDyPiP%3DEpudYuQTPPQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/19b861f880166fbdb67d268955e590881376f876

Modified Files
--------------
src/backend/executor/nodeWindowAgg.c | 140 +++++++++++++++++++----------------
1 file changed, 78 insertions(+), 62 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2024-09-05 04:18:44 pgsql: Optimize WindowAgg's use of tuplestores
Previous Message Jeff Davis 2024-09-04 21:38:51 pgsql: Remove lc_collate_is_c().