pgsql: Improve hash_any() to use word-wide fetches when hashing suitably

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve hash_any() to use word-wide fetches when hashing suitably
Date: 2008-04-06 16:54:49
Message-ID: 20080406165449.183057558E7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Improve hash_any() to use word-wide fetches when hashing suitably aligned
data. This makes for a significant speedup at the cost that the results
now vary between little-endian and big-endian machines; which forces us
to add explicit ORDER BYs in a couple of regression tests to preserve
machine-independent comparison results. Also, force initdb by bumping
catversion, since the contents of hash indexes will change (at least on
big-endian machines).

Kenneth Marshall and Tom Lane, based on work from Bob Jenkins. This commit
does not adopt Bob's new faster mix() algorithm, however, since we still need
to convince ourselves that that doesn't degrade the quality of the hashing.

Modified Files:
--------------
pgsql/contrib/dblink/expected:
dblink.out (r1.22 -> r1.23)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/expected/dblink.out?r1=1.22&r2=1.23)
pgsql/contrib/dblink/sql:
dblink.sql (r1.19 -> r1.20)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/sql/dblink.sql?r1=1.19&r2=1.20)
pgsql/src/backend/access/hash:
hashfunc.c (r1.55 -> r1.56)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashfunc.c?r1=1.55&r2=1.56)
pgsql/src/include/catalog:
catversion.h (r1.445 -> r1.446)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.445&r2=1.446)
pgsql/src/test/regress/expected:
portals.out (r1.16 -> r1.17)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/portals.out?r1=1.16&r2=1.17)
pgsql/src/test/regress/sql:
portals.sql (r1.13 -> r1.14)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/portals.sql?r1=1.13&r2=1.14)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-04-06 23:43:29 pgsql: Make plpgsql support FOR over a query specified by a cursor
Previous Message User Jbcooley 2008-04-06 00:28:40 npgsql - Npgsql2: Added assembly reference to fix build