Changeset: eec99a0e6b6e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/eec99a0e6b6e Branch: default Log Message:
merged diffs (78 lines): diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Vcs-Hg: https://dev.monetdb.org/hg/Monet Build-Depends: debhelper-compat (= 12), cmake (>= 3.12), bison, libbz2-dev, libcurl4-gnutls-dev, libgeos-dev (>= 3.10.0), libpcre2-dev, libreadline-dev, liblzma-dev, liblz4-dev (>= 1.8.0), - libxml2-dev, pkg-config, libxxash-dev, + libxml2-dev, pkg-config, libxxhash-dev, python3, unixodbc-dev, zlib1g-dev, libcfitsio-dev, libssl-dev (>= 1.1.1) diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -160,11 +160,25 @@ insert_string_bat(BAT *b, BATiter *ni, s toff = 0; b->tvkey |= ni->vkey; MT_thread_setalgorithm("shared vheap", __func__); + } else if (ni->vhfree <= GDK_STRHASHSIZE && + (!GDK_ELIMDOUBLES(b->tvheap) || + strLocate(b->tvheap, str_nil) == 0)) { + /* the incoming bat's vheap is empty, meaning the bat + * contains only nil values, if the destination bat's + * nil is also at offset 0, we can just copy zeros */ + toff = 0; + MT_thread_setalgorithm("empty source vheap (just nils)", + __func__); } else if (b->ustr) { MT_thread_setalgorithm("individual inserts into ustr", __func__); - } else if (mayshare && b->batRole == TRANSIENT && oldcnt == 0) { + } else if (mayshare && b->batRole == TRANSIENT && + (oldcnt == 0 || (b->tvheap->free <= GDK_STRHASHSIZE && + (!GDK_ELIMDOUBLES(ni->vh) || + strLocate(ni->vh, str_nil) == 0)))) { /* we can share the vheaps, so we then only need to - * append the offsets */ + * append the offsets; the condition is: b is empty, or + * its vheap is empty (i.e. there are only nils) and the + * incoming heap also stores them with offset 0 */ MT_lock_set(&b->theaplock); bat bid = b->tvheap->parentid; HEAPdecref(b->tvheap, bid == b->batCacheid); diff --git a/gdk/gdk_project.c b/gdk/gdk_project.c --- a/gdk/gdk_project.c +++ b/gdk/gdk_project.c @@ -396,6 +396,7 @@ BATproject2(BAT *restrict l, BAT *restri lo = l->tseqbase; hi = l->tseqbase + lcount; if (lo >= r1->hseqbase && hi <= r1->hseqbase + r1i.count) { + MT_thread_setalgorithm("using slice", __func__); bn = BATslice(r1, lo - r1->hseqbase, hi - r1->hseqbase); BAThseqbase(bn, l->hseqbase); msg = " (slice)"; @@ -409,6 +410,7 @@ BATproject2(BAT *restrict l, BAT *restri return NULL; } if (lo >= r2->hseqbase) { + MT_thread_setalgorithm("using slice", __func__); bn = BATslice(r2, lo - r2->hseqbase, hi - r2->hseqbase); BAThseqbase(bn, l->hseqbase); msg = " (slice2)"; @@ -439,6 +441,7 @@ BATproject2(BAT *restrict l, BAT *restri /* trivial: all values are nil (includes no entries at all) */ const void *nil = r1i.type == TYPE_msk ? &oid_nil : ATOMnilptr(r1i.type); + MT_thread_setalgorithm("constant result", __func__); bn = BATconstant(l->hseqbase, r1i.type == TYPE_oid || r1i.type == TYPE_msk ? TYPE_void : r1i.type, nil, lcount, TRANSIENT); if (bn != NULL && @@ -459,6 +462,7 @@ BATproject2(BAT *restrict l, BAT *restri * heaps */ tpe = r1i.width == 1 ? TYPE_bte : (r1i.width == 2 ? TYPE_sht : (r1i.width == 4 ? TYPE_int : TYPE_lng)); vheaptrick = true; + MT_thread_setalgorithm("using vheaptrick", __func__); } } else if (tpe == TYPE_msk || mask_cand(r1)) { r1 = BATunmask(r1); _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
