pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix performance regression in pg_strtointNN_safe functions 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix performance regression in pg_strtointNN_safe functions @ 2023-08-02 00:05 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: David Rowley @ 2023-08-02 00:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix performance regression in pg_strtointNN_safe functions Between 6fcda9aba and 1b6f632a3, the pg_strtoint functions became quite a bit slower in v16, despite efforts in 6b423ec67 to speed these up. Since the majority of cases for these functions will only contain base-10 digits, perhaps prefixed by a '-', it makes sense to have a special case for this and just fall back on the more complex version which processes hex, octal, binary and underscores if the fast path version fails to parse the string. While we're here, update the header comments for these functions to mention that hex, octal and binary formats along with underscore separators are now supported. Author: Andres Freund, David Rowley Reported-by: Masahiko Sawada Reviewed-by: Dean Rasheed, John Naylor Discussion: https://postgr.es/m/CAD21AoDvDmUQeJtZrau1ovnT_smN940%3DKp6mszNGK3bq9yRN6g%40mail.gmail.com Backpatch-through: 16, where 6fcda9aba and 1b6f632a3 were added Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3845577cb55eab3e06b3724e307ebbcac31f4841 Modified Files -------------- src/backend/utils/adt/numutils.c | 306 +++++++++++++++++++++++++++++++++++---- 1 file changed, 279 insertions(+), 27 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix performance regression in pg_strtointNN_safe functions @ 2023-08-02 00:06 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: David Rowley @ 2023-08-02 00:06 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix performance regression in pg_strtointNN_safe functions Between 6fcda9aba and 1b6f632a3, the pg_strtoint functions became quite a bit slower in v16, despite efforts in 6b423ec67 to speed these up. Since the majority of cases for these functions will only contain base-10 digits, perhaps prefixed by a '-', it makes sense to have a special case for this and just fall back on the more complex version which processes hex, octal, binary and underscores if the fast path version fails to parse the string. While we're here, update the header comments for these functions to mention that hex, octal and binary formats along with underscore separators are now supported. Author: Andres Freund, David Rowley Reported-by: Masahiko Sawada Reviewed-by: Dean Rasheed, John Naylor Discussion: https://postgr.es/m/CAD21AoDvDmUQeJtZrau1ovnT_smN940%3DKp6mszNGK3bq9yRN6g%40mail.gmail.com Backpatch-through: 16, where 6fcda9aba and 1b6f632a3 were added Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4e2e75cd29eb7bc591afe30fd7425629fe2c5a5d Modified Files -------------- src/backend/utils/adt/numutils.c | 306 +++++++++++++++++++++++++++++++++++---- 1 file changed, 279 insertions(+), 27 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-08-02 00:06 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-08-02 00:05 pgsql: Fix performance regression in pg_strtointNN_safe functions David Rowley <drowley@postgresql.org> 2023-08-02 00:06 pgsql: Fix performance regression in pg_strtointNN_safe functions David Rowley <drowley@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox