aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_op.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2015-10-09 19:03:44 -0400
committerRobert Haas <rhaas@postgresql.org>2015-10-09 19:03:44 -0400
commit0e57b4d8bd9674adaf5747421b3255b85e385534 (patch)
tree77ed5d43101568ce44ef056e149641c235c34832 /src/backend/utils/adt/jsonb_op.c
parentbfb54ff15a447fb22e9deae096e0d45b3e4bd56f (diff)
downloadpostgresql-0e57b4d8bd9674adaf5747421b3255b85e385534.tar.gz
postgresql-0e57b4d8bd9674adaf5747421b3255b85e385534.zip
Speed up text sorts where the same strings occur multiple times.
Cache strxfrm() blobs across calls made to the text SortSupport abbreviation routine. This can speed up sorting if the same string needs to be abbreviated many times in a row. Also, cache the result of the previous strcoll() comparison, so that if we're asked to compare the same strings agin, we do need to call strcoll() again. Perhaps surprisingly, these optimizations don't seem to hurt even when they don't help. memcmp() is really cheap compared to strcoll() or strxfrm(). Peter Geoghegan, reviewed by me.
Diffstat (limited to 'src/backend/utils/adt/jsonb_op.c')
0 files changed, 0 insertions, 0 deletions