git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 3522d0e) | patch
Hand code string to integer conversion for performance.
2018年7月22日 21:58:01 +0000 (14:58 -0700)
2018年7月22日 21:58:23 +0000 (14:58 -0700)
commit 86eaf208ea048936df6be77276a246d3f92e9620
Hand code string to integer conversion for performance.

As benchmarks show, using libc's string-to-integer conversion is
pretty slow. At least part of the reason for that is that strtol[l]
have to be more generic than what largely is required inside pg.

This patch considerably speeds up int2/int4 input (int8 already was
already using hand-rolled code).

Most of the existing pg_atoi callers have been converted. But as one
requires pg_atoi's custom delimiter functionality, and as it seems
likely that there's external pg_atoi users, it seems sensible to just
keep pg_atoi around.

Author: Andres Freund
Reviewed-By: Robert Haas
Discussion: https://postgr.es/m/20171208214437.qgn6zdltyq5hmjpk@alap3.anarazel.de
13 files changed:
contrib/spi/refint.c diff | blob | blame | history
doc/src/sgml/sources.sgml diff | blob | blame | history
src/backend/libpq/pqmq.c diff | blob | blame | history
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c diff | blob | blame | history
src/backend/tsearch/wparser_def.c diff | blob | blame | history
src/backend/utils/adt/arrayutils.c diff | blob | blame | history
src/backend/utils/adt/int.c diff | blob | blame | history
src/backend/utils/adt/int8.c diff | blob | blame | history
src/backend/utils/adt/numutils.c diff | blob | blame | history
src/backend/utils/adt/varlena.c diff | blob | blame | history
src/include/utils/builtins.h diff | blob | blame | history
src/test/regress/expected/int2.out diff | blob | blame | history
src/test/regress/expected/select_parallel.out diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /