[m-dev.] trivial diff: disable an RL optimization

Simon Taylor stayl at cs.mu.OZ.AU
Wed Jun 9 11:29:39 AEST 1999



Estimated hours taken: 0.1

compiler/rl_opt.m:
	Disable merging of multiple projections of a single relation
	into a single relation - it usually worsens performance.



Index: rl_opt.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/rl_opt.m,v
retrieving revision 1.2
diff -u -u -r1.2 rl_opt.m
--- rl_opt.m	1999/05/19 04:41:28	1.2
+++ rl_opt.m	1999/06/09 01:18:48
@@ -83,7 +83,20 @@
 		maybe_write_string(VeryVerbose, "..."),
 		maybe_flush_output(VeryVerbose),
 
-		{ Flags0 = [merge_output_projections] },
+		% The `merge_output_projections' flag enables
+		% the merging of multiple projections of a single
+		% relation into a single instruction, reducing the
+		% number of passes over the input relation.
+		% It is disabled because for small relations
+		% it significantly worsens performance.
+		% The problem is that it is much faster to make
+		% multiple passes over the input relation than
+		% to materialise all the outputs of the projections.
+		% If this pass were run again after stream detection,
+		% the merging could be done if all outputs are materialised
+		% anyway.
+		%{ Flags0 = [merge_output_projections] },
+		{ Flags0 = [] },
 		{ OptIndex = yes ->
 			Flags = [add_uniondiff | Flags0]
 		;
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list