Re: Performance improvements for src/port/snprintf.c
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org,
Thomas Munro <thomas.munro@enterprisedb.com>,
Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>
Date: 2018-10-06T03:16:13Z
Lists: pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes: > So here's a thing: I finally got to doing my performance tests for using > the Ryu float output code in float[48]out. > Ryu is so blazing fast that with it, COPY of a table with 2million rows > of 12 random float8 columns (plus id) becomes FASTER in text mode than > in binary mode (rather than ~5x slower): Oh yeah? Where's the code for this? > (And yes, I've double-checked the results and they look correct, other > than the formatting differences. COPY BINARY seems to have a bit more > overhead than text mode, even for just doing integers, I don't know > why.) The per-column overhead is more (length word vs delimiter) and I think the APIs for send/recv functions are potentially a bit less efficient too. regards, tom lane
Commits
-
Improve snprintf.c's handling of NaN, Infinity, and minus zero.
- 6eb3eb577d76 12.0 landed
-
Rationalize snprintf.c's handling of "ll" formats.
- 595a0eab7f42 12.0 landed
-
Provide fast path in snprintf.c for conversion specs that are just "%s".
- 6d842be6c118 12.0 landed
-
Make assorted performance improvements in snprintf.c.
- abd9ca377d66 12.0 landed
-
Set snprintf.c's maximum number of NL arguments to be 31.
- 625b38ea0e98 12.0 cited
-
Always use our own versions of *printf().
- 96bf88d52711 12.0 cited