Re: Ryu floating point output patch
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: pgsql-hackers@lists.postgresql.org
Cc: "David G. Johnston" <david.g.johnston@gmail.com>,
Donald Dong <xdong@csumb.edu>, Andres Freund <andres@anarazel.de>,
Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
Chapman Flack <chap@anastigmatix.net>
Date: 2019-02-02T20:14:18Z
Lists: pgsql-hackers
Attachments
- ryu9.patch (text/x-patch) patch
And another version. (I should have checked upstream before posting the last one, sigh) This one incorporates (with heavy adaptations) a new optimization from upstream, adding a fastpath for values that happen to be small nonzero integers. The overhead is low enough for this to be worthwhile. Additionally, I've now micro-optimized the fixed-point output format code (which is not in upstream), so it no longer makes a noticable difference to performance. There probably isn't any need for more optimization here since it's now measurably faster (sometimes almost 2x faster) than bigint output in all my tests (which probably means we could improve on bigint's performance, but that's a job for another day). -- Andrew (irc:RhodiumToad)
Commits
-
Provide an extra-float-digits setting for pg_dump / pg_dumpall
- af25bc03e17e 12.0 landed
-
Change floating-point output format for improved performance.
- 02ddd499322a 12.0 landed
-
Use strtof() and not strtod() for float4 input.
- f397e08599a3 12.0 landed