Thread: pgsql: Buy back some of the cycles spent in more-expensive hash

pgsql: Buy back some of the cycles spent in more-expensive hash

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Buy back some of the cycles spent in more-expensive hash functions by
selecting power-of-2, rather than prime, numbers of buckets in hash joins.
If the hash functions are doing their jobs properly by making all hash bits
equally random, this is good enough, and it saves expensive integer division
and modulus operations.

Modified Files:
--------------
    pgsql/src/backend/executor:
        nodeHash.c (r1.111 -> r1.112)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeHash.c.diff?r1=1.111&r2=1.112)
    pgsql/src/include/executor:
        hashjoin.h (r1.44 -> r1.45)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/hashjoin.h.diff?r1=1.44&r2=1.45)