Changeset: f15a84ba44de for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f15a84ba44de
Modified Files:
monetdb5/modules/mal/pp_hash.h
sql/backends/monet5/rel_pphash.c
Branch: pp_hashjoin
Log Message:
allow for somewhat larger estimated hash tables
cleanup hash macros
diffs (72 lines):
diff --git a/monetdb5/modules/mal/pp_hash.h b/monetdb5/modules/mal/pp_hash.h
--- a/monetdb5/modules/mal/pp_hash.h
+++ b/monetdb5/modules/mal/pp_hash.h
@@ -11,8 +11,6 @@
#ifndef _PP_HASH_H_
#define _PP_HASH_H_
-//#include "pp_mem.h"
-
#define GIDBITS 63
//#define HT_MIN_SIZE 1024*64*8
@@ -33,7 +31,6 @@
#define nextk linear_probing
//#define nextk quadratic_probing
-
#define hash_rehash(ht, p, err) \
{ \
if (ht_rehash(ht)) { \
@@ -73,38 +70,18 @@
#define _hash_date(X) _hash_int(X)
#define _hash_inet4(X) _hash_int((*(int*)&X))
-//#define _hash_lng(X)
((((ulng)X)>>7)^(((ulng)X)>>13)^(((ulng)X)>>21)^(((ulng)X)>>31)^(((ulng)X)>>38)^(((ulng)X)>>46)^(((ulng)X)>>56)^((ulng)X))
-#define _hash_oid(X) _hash_lng((X*98317))
+#define _hash_oid(X) _hash_lng(X)
#define _hash_daytime(X) _hash_lng(X)
#define _hash_timestamp(X) _hash_lng(X)
#ifdef HAVE_HGE
#define _hash_uuid(X) _hash_hge(X)
-
-#define _mix_hge(X) (((hge) (X) >> 7) ^ \
- ((hge) (X) >> 13) ^ \
- ((hge) (X) >> 21) ^ \
- ((hge) (X) >> 31) ^ \
- ((hge) (X) >> 38) ^ \
- ((hge) (X) >> 46) ^ \
- ((hge) (X) >> 56) ^ \
- ((hge) (X) >> 65) ^ \
- ((hge) (X) >> 70) ^ \
- ((hge) (X) >> 78) ^ \
- ((hge) (X) >> 85) ^ \
- ((hge) (X) >> 90) ^ \
- ((hge) (X) >> 98) ^ \
- ((hge) (X) >> 107) ^ \
- ((hge) (X) >> 116) ^ \
- (hge) (X))
#define _hash_hge(X) (_hash_lng(((lng)X) ^ _hash_lng((lng)(X>>64))))
-//#define hash_hge(X) ((lng)_mix_hge(X))
#endif
#define _hash_flt(X) (_hash_int(X))
#define _hash_dbl(X) (_hash_lng(X))
#define _hash_gid(X) (_hash_lng(X))
-#define ROT64(x, y) ((x << y) | (x >> (64 - y)))
//#define combine(X,Y) (_hash_lng((X*5671432987))^(ulng)Y)
//#define combine(X,Y) (_hash_lng((X*(hash_prime_nr[h->bits-5])))^(ulng)Y)
#define combine(X,Y,pr) (_hash_lng((X*(pr)))^(ulng)Y)
diff --git a/sql/backends/monet5/rel_pphash.c b/sql/backends/monet5/rel_pphash.c
--- a/sql/backends/monet5/rel_pphash.c
+++ b/sql/backends/monet5/rel_pphash.c
@@ -28,7 +28,7 @@ _estimate(mvc *sql, sql_rel *rel)
//lng est = get_max_bt_count(sql, rel, 0);
lng est = get_rel_count(rel);
- if (est >= 85000000) {
+ if (est >= 160000000) {
printf("#using large fallback\n");
fflush(stdout);
//est = 85000000;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]