[m-dev.] diff: tree234 speedup

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Jul 24 10:52:17 AEST 2000


library/tree234.m:
	Remove some tests that are unnecessary for balanced trees.
	This yields a 0.5% speedup on the compiler.diff: tree234 speedu

Zoltan.

cvs diff: Diffing .
Index: tree234.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/tree234.m,v
retrieving revision 1.29
diff -u -b -r1.29 tree234.m
--- tree234.m	2000/07/19 03:42:41	1.29
+++ tree234.m	2000/07/24 00:34:54
@@ -861,8 +861,8 @@
 
 tree234__insert2(two(K0, V0, T0, T1), K, V, Tout) :-
 	(
-		T0 = empty,
-		T1 = empty
+		T0 = empty
+		% T1 = empty implied by T0 = empty
 	->
 		compare(Result, K, K0),
 		(
@@ -956,9 +956,9 @@
 
 tree234__insert3(three(K0, V0, K1, V1, T0, T1, T2), K, V, Tout) :-
 	(
-		T0 = empty,
-		T1 = empty,
-		T2 = empty
+		T0 = empty
+		% T1 = empty implied by T0 = empty
+		% T2 = empty implied by T0 = empty
 	->
 		compare(Result0, K, K0),
 		(
@@ -1157,8 +1157,8 @@
 
 tree234__set2(two(K0, V0, T0, T1), K, V, Tout) :-
 	(
-		T0 = empty,
-		T1 = empty
+		T0 = empty
+		% T1 = empty implied by T0 = empty
 	->
 		compare(Result, K, K0),
 		(
@@ -1254,9 +1254,9 @@
 
 tree234__set3(three(K0, V0, K1, V1, T0, T1, T2), K, V, Tout) :-
 	(
-		T0 = empty,
-		T1 = empty,
-		T2 = empty
+		T0 = empty
+		% T1 = empty implied by T0 = empty
+		% T2 = empty implied by T0 = empty
 	->
 		compare(Result0, K, K0),
 		(
--------------------------------------------------------------------------
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