Changeset: 086c160564c5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=086c160564c5
Modified Files:
monetdb5/optimizer/opt_support.mx
Branch: default
Log Message:
Squeezing cycles
Reordering of simple tests can safe some time.
diffs (46 lines):
diff --git a/monetdb5/optimizer/opt_support.mx
b/monetdb5/optimizer/opt_support.mx
--- a/monetdb5/optimizer/opt_support.mx
+++ b/monetdb5/optimizer/opt_support.mx
@@ -878,25 +878,18 @@
int hasSameSignature(MalBlkPtr mb, InstrPtr p, InstrPtr q){
int i;
- if( q->retc != p->retc || q->argc != p->argc) return FALSE;
- /* actually also check their types */
- for( i=0; i<p->argc; i++)
- if (getArgType(mb,p,i) != getArgType(mb,q,i))
- return FALSE;
+
if ( getFunctionId(q) == getFunctionId(p) &&
getModuleId(q) == getModuleId(p) &&
getFunctionId(q) != 0 &&
- getModuleId(q) != 0)
+ getModuleId(q) != 0) {
+ if( q->retc != p->retc || q->argc != p->argc) return FALSE;
+ for( i=0; i<p->argc; i++)
+ if (getArgType(mb,p,i) != getArgType(mb,q,i))
+ return FALSE;
return TRUE;
- if( getFunctionId(q)==0 && getFunctionId(p)!=0 ) return FALSE;
- if( getFunctionId(q)!=0 && getFunctionId(p)==0 ) return FALSE;
- if( getFunctionId(q) && getFunctionId(p) &&
idcmp(getFunctionId(q),getFunctionId(p)) )
- return FALSE;
- if( getModuleId(q)==0 && getModuleId(p)!=0 ) return FALSE;
- if( getModuleId(q)!=0 && getModuleId(p)==0 ) return FALSE;
- if( getModuleId(q) && getModuleId(p) &&
idcmp(getModuleId(q),getModuleId(p)))
- return FALSE;
- return TRUE;
+ }
+ return FALSE;
}
int hasSameArguments(MalBlkPtr mb, InstrPtr p, InstrPtr q)
@@ -905,7 +898,7 @@
VarPtr w,u;
(void) mb;
- if( p== NULL || q== NULL || p->retc != q->retc || p->argc != q->argc)
+ if( p->retc != q->retc || p->argc != q->argc)
return FALSE;
for(k=p->retc; k<p->argc;k++)
if( q->argv[k]!= p->argv[k]){
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list