Changeset: 03bdcd83c447 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03bdcd83c447
Modified Files:
MonetDB5/src/mal/mal_interpreter.mx
Branch: Oct2010
Log Message:
DFLOWscheduler(): walk forward rather than backward through MAL plan
When looking for eligible statements, DFLOWscheduler() now walks
forward rather than backward through the MAL plan --- which appears
to be more natural to me, as statements whos inputs are ready to
use should appear earlier in the plan than those whos inputs are
not ready, yet, i.e., still have to be calculated.
Net effect:
Tests sql/src/test/rdf/Tests/q?_v.sql speed up by up to a factor 6.7
(from 6.6 secs tp 0.9 secs).
diffs (21 lines):
diff -r 6f78ad03301a -r 03bdcd83c447 MonetDB5/src/mal/mal_interpreter.mx
--- a/MonetDB5/src/mal/mal_interpreter.mx Thu Oct 07 15:01:00 2010 +0200
+++ b/MonetDB5/src/mal/mal_interpreter.mx Thu Oct 07 15:17:12 2010 +0200
@@ -1392,7 +1392,7 @@
break;
/* first try to find all instructions that use the released
target */
candidates = 0;
- for(i = limit-1; i >= pc ; i--)
+ for(i = pc; i < limit ; i++)
if (fs[i].status == DFLOWpending ) {
p = getInstrPtr(flow->mb, fs[i].pc);
for ( j= p->retc; j < p->argc; j++)
@@ -1410,7 +1410,7 @@
}
/* if all work done then inspect rest */
if (candidates == 0)
- for(i = limit-1 ; i >= pc && queued < flow->nway ; i--)
+ for(i = pc ; i < limit && queued < flow->nway ; i++)
if (fs[i].status == DFLOWpending ) {
p = getInstrPtr(flow->mb, fs[i].pc);
if ( flow->stk->admit == 0 ||
(*flow->stk->admit)(flow->cntxt, flow->mb, flow->stk, p) )
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list