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

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add a fast pre-check for equality of equal-length strings.
Date: 2014-09-19 16:58:41
Message-ID: E1XV1W5-0004tw-M5@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e246b3d6eac09d0770e6f68e69f2368d02db88af

Modified Files
--------------
src/backend/utils/adt/varlena.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-09-19 17:13:15 pgsql: doc: Use <literal> and all-caps for READ COMMITTED isolation lev
Previous Message Stephen Frost 2014-09-19 15:41:31 pgsql: Row-Level Security Policies (RLS)