Re: [basex-talk] Set Operator Examples

2013-09-26 Thread Arve Gengelbach
I had a typo in my example. The return did not call the map2 version. With it, the results were (now on 7.7 and Windows 7) And I posted the wrong version. Usage of ! within map:new() is not as fast as a flowr expression (in general). BUT neither of the “fastest two” functions yields valid

Re: [basex-talk] Set Operator Examples

2013-09-26 Thread Christian Grün
Thanks Arto for the interesting comparisons. One more rewriting for map2 could be.. declare function local:map2($a, $b) { let $m2 := map:new($b ! map:entry(., true())) return $a[$m2(.)] }; ..but my assumption is that all rewritings should yield similar performance, because the flwor

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arve Gengelbach
Hej Arto, just being interested: How does it compare to a FLOWR expression? declare function local:difference-flowr($a, $b) { for $x in $a where not($x = $b) group by $x return $x[1] }; cheers Arve Am 25.09.13 07:22 schrieb Arto Viitanen: Question was about set operations in BaseX. I

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arto Viitanen
-Original Message- From: Arve Gengelbach [mailto:a...@basex.org] Sent: 25. syyskuuta 2013 9:08 To: Arto Viitanen Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Set Operator Examples Hej Arto, just being interested: How does it compare to a FLOWR expression? declare

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arve Gengelbach
-talk] Set Operator Examples Hej Arto, just being interested: How does it compare to a FLOWR expression? declare function local:difference-flowr($a, $b) { for $x in $a where not($x = $b) group by $x return $x[1] }; pred 51787.06 ms map 485.16 ms map2 325.09 ms flowr

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Andy Bunce
...@basex.org] Sent: 25. syyskuuta 2013 9:08 To: Arto Viitanen Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Set Operator Examples Hej Arto, just being interested: How does it compare to a FLOWR expression? declare function local:difference-flowr($a, $b) { for $x

Re: [basex-talk] Set Operator Examples

2013-09-25 Thread Arto Viitanen
I had a typo in my example. The return did not call the map2 version. With it, the results were (now on 7.7 and Windows 7) - pred 58278.25 ms - map 272.68 ms - map2 74.27 ms - map2! 92.97 ms - flowr 43018.3 ms Hej Arto, One can even improve your map2 by using the [Simple map operator].

[basex-talk] Set Operator Examples

2013-09-24 Thread John Best
Hi all, Where can I find examples using set operators... wrt BaseX. -- Have a nice day JBest ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Re: [basex-talk] Set Operator Examples

2013-09-24 Thread Christian Grün
Hi John, XQuery defines three set operators, namely union, intersect and except. As those are not BaseX-specific, you’ll need to check out other literature on XQuery Hope this helps, Christian ___ 2013/9/24 John Best johnbest5...@gmail.com: Hi all, Where can I find