Changeset: 9b08f3f2f03f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b08f3f2f03f
Modified Files:
monetdb5/extras/jaql/jaqlgencode.c
Branch: Oct2012
Log Message:
j_group: avoid expensive tuple replacement operations
diffs (65 lines):
diff --git a/monetdb5/extras/jaql/jaqlgencode.c
b/monetdb5/extras/jaql/jaqlgencode.c
--- a/monetdb5/extras/jaql/jaqlgencode.c
+++ b/monetdb5/extras/jaql/jaqlgencode.c
@@ -5954,6 +5954,19 @@ dumptree(jc *j, Client cntxt, MalBlkPtr
b = dumprefvar(j, mb, w->tval2, a);
/* b should point to all "groups" now */
+ g = dumpnextid(mb, j->j1);
+ dumpbatwritable(j, mb, 1);
+ q = newInstruction(mb, ASSIGNsymbol);
+ setModuleId(q, batRef);
+ setFunctionId(q, insertRef);
+ q = pushReturn(mb, q,
newTmpVariable(mb, TYPE_any));
+ q = pushArgument(mb, q, j->j1);
+ q = pushArgument(mb, q, g);
+ q = pushBte(mb, q, 'a');
+ j->j1 = getArg(q, 0);
+ pushInstruction(mb, q);
+ j->startoid = g;
+ dumpbatwritable(j, mb, 5);
for (; *lp != -1; lp++) {
q = newInstruction(mb,
ASSIGNsymbol);
setModuleId(q, algebraRef);
@@ -6021,24 +6034,6 @@ dumptree(jc *j, Client cntxt, MalBlkPtr
/* e = grouparrayid:elementid */
q = newInstruction(mb,
ASSIGNsymbol);
- setModuleId(q, algebraRef);
- setFunctionId(q, projectRef);
- q = pushReturn(mb, q,
newTmpVariable(mb, TYPE_any));
- q = pushOid(mb, q, (oid)0);
- q = pushArgument(mb, q, e);
- d = getArg(q, 0);
- pushInstruction(mb, q);
- q = newInstruction(mb,
ASSIGNsymbol);
- setModuleId(q, algebraRef);
- setFunctionId(q,
putName("sdifference", 11));
- q = pushReturn(mb, q,
newTmpVariable(mb, TYPE_any));
- q = pushArgument(mb, q, j->j5);
- q = pushArgument(mb, q, d);
- j->j5 = getArg(q, 0);
- j->ro5 = 0;
- pushInstruction(mb, q);
-
- q = newInstruction(mb,
ASSIGNsymbol);
setModuleId(q, batRef);
setFunctionId(q, insertRef);
q = pushReturn(mb, q,
newTmpVariable(mb, TYPE_any));
@@ -6058,7 +6053,7 @@ dumptree(jc *j, Client cntxt, MalBlkPtr
setModuleId(q, algebraRef);
setFunctionId(q, projectRef);
q = pushReturn(mb, q,
newTmpVariable(mb, TYPE_any));
- q = pushOid(mb, q, (oid)0);
+ q = pushArgument(mb, q, g);
q = pushArgument(mb, q, e);
e = getArg(q, 0);
pushInstruction(mb, q);
@@ -6079,7 +6074,6 @@ dumptree(jc *j, Client cntxt, MalBlkPtr
q = pushBte(mb, q, 'a');
e = getArg(q, 0);
pushInstruction(mb, q);
- dumpbatwritable(j, mb, 1);
q = newInstruction(mb,
ASSIGNsymbol);
setModuleId(q, batRef);
setFunctionId(q, insertRef);
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list