]> granicus.if.org Git - postgresql/commit
Use memcmp() rather than strncmp() when shorter string length is known.
authorRobert Haas <rhaas@postgresql.org>
Wed, 22 Dec 2010 03:11:40 +0000 (22:11 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 22 Dec 2010 03:11:40 +0000 (22:11 -0500)
commit32ba2b516066688ff56e6d62a7ff4a01c88f5700
treed92587bec7ec83167b11d71afd204fa72d1f6f80
parentc5160b7eecf97a357375960b02a30317474334a3
Use memcmp() rather than strncmp() when shorter string length is known.

It appears that this will be faster for all but the shortest strings;
at least one some platforms, memcmp() can use word-at-a-time comparisons.

Noah Misch, somewhat pared down.
contrib/hstore/hstore_io.c
contrib/hstore/hstore_op.c
contrib/ltree/ltree_gist.c
contrib/ltree/ltree_op.c
src/backend/nodes/readfuncs.c
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c