Changeset: ecf3c1a4555f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ecf3c1a4555f
Modified Files:
        gdk/gdk_strimps.c
Branch: string_imprints
Log Message:

Avoid dividing in favor of multiplying


diffs (20 lines):

diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -400,7 +400,7 @@ STRMPcreateStrimpHeap(BAT *b, BAT *s)
 #define STRIMP_COMPLETE(b)                     \
        b->tstrimps != NULL &&                  \
                (b->tstrimps == (Strimps *)1 ||                         \
-                (b->tstrimps->strimps.free - ((char 
*)b->tstrimps->bitstrings_base - b->tstrimps->strimps.base))/sizeof(uint64_t) 
== b->batCount)
+                (b->tstrimps->strimps.free - ((char 
*)b->tstrimps->bitstrings_base - b->tstrimps->strimps.base)) == 
b->batCount*sizeof(uint64_t))
 
 static bool
 BATcheckstrimps(BAT *b)
@@ -485,7 +485,6 @@ BATcheckstrimps(BAT *b)
         * not null and the number of bitstrings is equal to the bat
         * count.
         */
-       // assert(!b->tstrimps || (b->tstrimps->strimps.free - HSIZE(((uint64_t 
*)b->tstrimps->strimps.base)[0]))/sizeof(uint64_t) <= b->batCount);
        ret = STRIMP_COMPLETE(b);
        if (ret) {
                TRC_DEBUG(ACCELERATOR,
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to