pgsql: Provide fast path in snprintf.c for conversion specs that are ju

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Provide fast path in snprintf.c for conversion specs that are ju
Date: 2018-10-03 17:05:07
Message-ID: E1g7kaB-0005HT-Sy@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Provide fast path in snprintf.c for conversion specs that are just "%s".

This case occurs often enough (around 45% of conversion specs executed
in our regression tests are just "%s") that it's worth an extra test
per conversion spec to allow skipping all the logic associated with
field widths and padding when it happens.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6d842be6c11887930a0f4128fd6aa4de427cfd2a

Modified Files
--------------
src/port/snprintf.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-10-03 18:33:18 pgsql: Rationalize snprintf.c's handling of "ll" formats.
Previous Message Tom Lane 2018-10-03 14:18:28 pgsql: Make assorted performance improvements in snprintf.c.