pgsql: Avoid unnecessary division in interval_cmp_value().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid unnecessary division in interval_cmp_value().
Date: 2021-09-26 18:24:09
Message-ID: E1mUYor-0005zY-Fo@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid unnecessary division in interval_cmp_value().

Splitting the time field into days and microseconds is pretty
useless when we're just going to recombine those values.
It's unclear if anyone will notice the speedup in real-world
cases, but a cycle shaved is a cycle earned.

Discussion: https://postgr.es/m/2629129.1632675713@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e94c1a55dada49772622d2be2d17a2a9973b2661

Modified Files
--------------
src/backend/utils/adt/timestamp.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-09-26 21:53:48 pgsql: Track LLVM 14 API changes.
Previous Message Michael Paquier 2021-09-26 10:19:55 pgsql: Fix typos in docs