Changeset: ff8549560d5f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ff8549560d5f
Modified Files:
        gdk/gdk_search.c
Branch: default
Log Message:

imprived determination of BUN width for hash tables:

The width depeneds on the larger of hash-mask & linked list length
(i.d., BAT length), not on the sum of both.


diffs (12 lines):

diff --git a/gdk/gdk_search.c b/gdk/gdk_search.c
--- a/gdk/gdk_search.c
+++ b/gdk/gdk_search.c
@@ -125,7 +125,7 @@ Hash *
 HASHnew(Heap *hp, int tpe, BUN size, BUN mask)
 {
        Hash *h = NULL;
-       int width = HASHwidth(mask + size);
+       int width = HASHwidth(MAX(mask,size));
 
        if (HEAPalloc(hp, mask + size, width) < 0)
                return NULL;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to