pgsql: At the head of wchareq, length of (multibyte) character is

Started by Bruce Momjianabout 21 years ago1 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Log Message:
-----------
At the head of wchareq, length of (multibyte) character is compared by
using pg_mblen. Therefore, pg_mblen is executed many times, and it
becomes a bottleneck.

This patch makes a short cut, and reduces execution frequency of
pg_mblen by comparing the first byte first.

a_ogawa

Modified Files:
--------------
pgsql/src/backend/utils/adt:
like.c (r1.59 -> r1.60)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like.c.diff?r1=1.59&r2=1.60)