Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv13104/runtime
Modified Files:
pf_support.mx
Log Message:
to restrict intermediate results as much/early as possible:
push kind-test of ns-, loc-, nsloc-tests (ELEMENT) & target-tests (PI)
as pre-tests down into the loop-lifted following step,
even/although we don't have ns-, loc-, nsloc-, target-pre-tests
for the loop-lifted following step, yet(?).
Also: avoid doing the kind-test as post-test (again),
in case we already did it as pre-test.
Declaration/disclaimer:
-----------------------
On my FC6 desktop (64-bit, 64-bit OIDs, configured with --enable-optimize,
compiled with gcc 4.1.1), this check-in does not make any pathfinder test
fail that did not also fail with the most recent code base in CVS prior to
this check-in.
I did not check in detail, though, whether all previously failing tests
still fail the same way after this check-in as they did before this
check-in.
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -d -r1.230 -r1.231
--- pf_support.mx 15 May 2007 14:19:32 -0000 1.230
+++ pf_support.mx 15 May 2007 16:03:11 -0000 1.231
@@ -1808,16 +1808,24 @@
# determine a sel [qnid,qnid] of qualifying nslocs (i.e. prop
IDs)
var sel :=
ws.fetch(@1).fetch(bat2constant(pre_cont)).ord_uselect(@2);
- # first join on prop, getting some false hits for non ELEMENT
nodes
+ # first join on prop, possibly getting some false hits for non
ELEMENT nodes
tmp_res :=
result_part_item.leftfetchjoin(pre_prop).leftjoin(sel).hmark([EMAIL PROTECTED]);
- # remove false hits
- tmp_res :=
tmp_res.leftfetchjoin(result_part_item).leftfetchjoin(pre_kind).ord_uselect(@3).hmark([EMAIL
PROTECTED]).leftfetchjoin(tmp_res);
+ if (isnil(kind_test)) {
+ # remove false hits;
+ # only necessary if we haven't done the kind-test as
pushed-down pre-test
+ tmp_res :=
tmp_res.leftfetchjoin(result_part_item).leftfetchjoin(pre_kind).ord_uselect(@3).hmark([EMAIL
PROTECTED]).leftfetchjoin(tmp_res);
+ }
} else {
# the cont value refers back to multiple different containers
(XPath step in transient doc container)
- # first select the element nodes
- var X :=
result_part_item.leftfetchjoin(pre_kind).ord_uselect(@3).hmark([EMAIL
PROTECTED]);
+ var X := result_part_item;
+ if (isnil(kind_test)) {
+ # first select the element nodes;
+ # only necessary if we haven't done the kind-test as
pushed-down pre-test
+ X := X.leftfetchjoin(pre_kind).ord_uselect(@3);
+ }
+ X := X.hmark([EMAIL PROTECTED]);
# fetch cont and prop values
tmp_res := X.leftfetchjoin(result_part_item);
@@ -1924,10 +1932,10 @@
@= loop_lifted_scj_step1x
@:loop_lifted_scj_step2(@1,,,,,
@:params1@,)@
@:loop_lifted_scj_step2(@1,_with_kind_test, @:kind_args@, @:kind_params@,,
@:params1@,kind_test := kind;)@
-@:loop_lifted_scj_step2(@1,_with_nsloc_test,
@:nsloc_args@,@:nsloc_params@,@:nsloc_post@, @:params1@,)@
-@:loop_lifted_scj_step2(@1,_with_ns_test, @:ns_args@, @:ns_params@,
@:ns_post@, @:params1@,)@
-@:loop_lifted_scj_step2(@1,_with_loc_test, @:loc_args@, @:loc_params@,
@:loc_post@, @:params1@,)@
-@:loop_lifted_scj_step2(@1,_with_target_test,@:tgt_args@, @:tgt_params@,
@:target_post@, @:params1@,)@
+@:loop_lifted_scj_step2(@1,_with_nsloc_test,
@:nsloc_args@,@:nsloc_params@,@:nsloc_post@, @:params1@,kind_test :=
ELEMENT;)@
+@:loop_lifted_scj_step2(@1,_with_ns_test, @:ns_args@, @:ns_params@,
@:ns_post@, @:params1@,kind_test := ELEMENT;)@
+@:loop_lifted_scj_step2(@1,_with_loc_test, @:loc_args@, @:loc_params@,
@:loc_post@, @:params1@,kind_test := ELEMENT;)@
+@:loop_lifted_scj_step2(@1,_with_target_test,@:tgt_args@, @:tgt_params@,
@:target_post@, @:params1@,kind_test := PI;)@
@
#==================================================================
# actual definition of the scj proc
-------------------------------------------------------------------------
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