Add a fast pre-check for equality of equal-length strings.

Robert Haas <rhaas@postgresql.org>

Commit: e246b3d6eac09d0770e6f68e69f2368d02db88af
Author: Robert Haas <rhaas@postgresql.org>
Date: 2014-09-19T16:39:00Z
Releases: 9.5.0
Add a fast pre-check for equality of equal-length strings.

Testing reveals that that doing a memcmp() before the strcoll() costs
practically nothing, at least on the systems we tested, and it speeds
up sorts containing many equal strings significatly.

Peter Geoghegan.  Review by myself and Heikki Linnakangas.  Comments
rewritten by me.

Files

PathChange+/−
src/backend/utils/adt/varlena.c modified +20 −0