Changeset: 1e2403aa4bbd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e2403aa4bbd
Modified Files:
monetdb5/optimizer/opt_accumulators.mx
monetdb5/optimizer/opt_pipes.mx
Branch: default
Log Message:
Re-enable accumulator optimizer
The bug that caused it to remove has been handled by the scheduler
now. It could fail if the storage was re-used before all concurrent
threads finished. The scheduler now does not take the last
(garbage collect) statement before all others are finished.
Placing it just before the garbage collector means that it
won't interfere with other optimizers looking for batcalc
operations.
diffs (40 lines):
diff --git a/monetdb5/optimizer/opt_accumulators.mx
b/monetdb5/optimizer/opt_accumulators.mx
--- a/monetdb5/optimizer/opt_accumulators.mx
+++ b/monetdb5/optimizer/opt_accumulators.mx
@@ -33,7 +33,7 @@
If variable t2 is a temporary variable and not used any further in
the program block, we can re-use its storage space.
@example
- t3:= batcalc.*(t2,64,t2);
+ t3:= batcalc.*(t2,64,true,false);
t4:= batcalc.+(t1,t3);
@end example
The implementation is straight forward. It only deals with the
@@ -45,8 +45,13 @@
or represent a view over a persistent BAT.
[NOTE the accumulator optimizer is known to produce
-problems due to concurrent access to BATs.
-It has been disabled]
+problems due to concurrent access to the BATs.
+However, the last instruction for a BAT is now scheduled only
+when all other uses have finished.
+
+The accumulator can be installed just before garbage collector,
+because the other modules do not recognize batcalc operations with
+more arguments.]
@{
@mal
pattern optimizer.accumulators():str
diff --git a/monetdb5/optimizer/opt_pipes.mx b/monetdb5/optimizer/opt_pipes.mx
--- a/monetdb5/optimizer/opt_pipes.mx
+++ b/monetdb5/optimizer/opt_pipes.mx
@@ -55,7 +55,7 @@
* The default pipe line contains as of Feb2010 mitosis-mergetable-reorder,
* aimed at large tables and improved access locality
*/
-{ "default_pipe",
"inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector"
},
+{ "default_pipe",
"inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,accumulators,garbageCollector"
},
/*
* The no_mitosis pipe line is (and should be kept!) identical to the default
pipeline,
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list