At the head of wchareq, length of (multibyte) character is compared by

Bruce Momjian <bruce@momjian.us>

Commit: 8c792fe9cbe1dcfdafcdc70b961be714631324ec
Author: Bruce Momjian <bruce@momjian.us>
Date: 2005-05-25T22:59:33Z
Releases: 8.1.0
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

Files

PathChange+/−
src/backend/utils/adt/like.c modified +11 −5