Make abbreviated key comparisons for text a bit cheaper.

Robert Haas <rhaas@postgresql.org>

Commit: bfb54ff15a447fb22e9deae096e0d45b3e4bd56f
Author: Robert Haas <rhaas@postgresql.org>
Date: 2015-10-09T19:06:06Z
Releases: 9.6.0
Make abbreviated key comparisons for text a bit cheaper.

If we do some byte-swapping while abbreviating, we can do comparisons
using integer arithmetic rather than memcmp.

Peter Geoghegan, reviewed and slightly revised by me.

Files

PathChange+/−
src/backend/utils/adt/varlena.c modified +20 −9
src/include/port/pg_bswap.h modified +24 −2