Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv7389/runtime
Modified Files:
pf_support.mx
Log Message:
(1) do not use the nsloc index if the context node set is small (<logN)
(2) small perf improvement in log2 function
get_security_price should is faster now => 15msec on 1GB
but (1) will improve performance across the board
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -d -r1.209 -r1.210
--- pf_support.mx 18 Apr 2007 09:42:30 -0000 1.209
+++ pf_support.mx 18 Apr 2007 12:38:50 -0000 1.210
@@ -435,6 +435,8 @@
const sema_nil := sema(nil);
const timestamp_nil := timestamp(nil);
+PROC log2(any i) : int { return int(log(dbl(i))/M_LN2); }
+
PROC addValues(bat[void,any::1] container, any::1 delta) : oid
{
container.append(delta);
@@ -1171,15 +1173,6 @@
return join_order;
}
-PROC log2(lng i) : int
-{
- var n := 0;
- while(i >= 1LL) {
- i >>= 1; n :+= 1;
- }
- return n;
-}
-
var lng_oid := ifthenelse(isnil(oid(LNG_MAX)),lng,oid);
# loop-lifted variant; lo and ro are the outer iteration numbers that should
match
@@ -1667,7 +1660,7 @@
@= prefilter
cands := ws.fetch(PRE_SIZE).fetch(contID).mirror();
var pre_cont := ws.fetch(PRE_CONT).fetch(contID);
- if (is_constant(pre_cont)) {
+ if (is_constant(pre_cont) and (count(result_part_item) >
16*log2(count(cands)))) {
var qn_sel :=
ws.fetch(@2).fetch(bat2constant(pre_cont)).ord_uselect(@1);
if (isnil(CATCH(cands := ws_lookup(ws, contID,
qn_sel.mirror())))) {
var map_pid := ws.fetch(MAP_PID).fetch(contID);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins