pgsql: Use memcmp() rather than strncmp() when shorter string length is

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Use memcmp() rather than strncmp() when shorter string length is
Дата
Msg-id E1PVFAv-0006Ho-CW@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=32ba2b516066688ff56e6d62a7ff4a01c88f5700

Modified Files
--------------
contrib/hstore/hstore_io.c      |    8 ++++----
contrib/hstore/hstore_op.c      |   26 +++++++++++++-------------
contrib/ltree/ltree_gist.c      |    2 +-
contrib/ltree/ltree_op.c        |    8 ++++----
src/backend/nodes/readfuncs.c   |    2 +-
src/backend/utils/adt/varchar.c |    6 +++---
src/backend/utils/adt/varlena.c |   14 +++++++-------
7 files changed, 33 insertions(+), 33 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Fix typos.
Следующее
От: Magnus Hagander
Дата:
Сообщение: pgsql: Add PQlibVersion() function to libpq