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

compute type once outside loop


diffs (31 lines):

diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -1437,6 +1437,13 @@ hashjoin(BAT *r1, BAT *r2, BAT *l, BAT *
                                r1->trevsorted = 0;
                }
        } else {
+               int t = r->htype;
+               if (t != ATOMstorage(t) &&
+                   ATOMnilptr(ATOMstorage(t)) == ATOMnilptr(t) &&
+                   BATatoms[ATOMstorage(t)].atomCmp == BATatoms[t].atomCmp &&
+                   BATatoms[ATOMstorage(t)].atomHash == BATatoms[t].atomHash)
+                       t = ATOMstorage(t);
+
                for (lo = lstart - BUNfirst(l) + l->hseqbase; lstart < lend; 
lo++) {
                        if (l->ttype == TYPE_void) {
                                if (l->tseqbase != oid_nil)
@@ -1460,13 +1467,6 @@ hashjoin(BAT *r1, BAT *r2, BAT *l, BAT *
                                                break;
                                }
                        } else {
-                               int t = r->htype;
-                               if (t != ATOMstorage(t) &&
-                                   ATOMnilptr(ATOMstorage(t)) == ATOMnilptr(t) 
&&
-                                   BATatoms[ATOMstorage(t)].atomCmp == 
BATatoms[t].atomCmp &&
-                                   BATatoms[ATOMstorage(t)].atomHash == 
BATatoms[t].atomHash)
-                                       t = ATOMstorage(t);
-
                                switch (t) {
                                case TYPE_int:
                                        if (!nil_matches && *(const int*)v == 
int_nil) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to