Changes

Jump to navigation Jump to search
19 bytes added ,  10:39, 25 April 2022
==Loop Unrolling==
 
{{Mark|Introduced with Version 9.6:}}
Loops with few iterations are ''unrolled'' by the XQuery compiler to enable further optimizations:
(: rewritten to :)
1 ! (. * 2), 2 ! (. * 2)
 
(: further rewritten to :)
1 * 2, 2 * 2
* Simple map expressions
* Simple FLWOR expressions
* Filter expressions* [[Higher-Order Functions#fn:fold-left|fn:fold-left]], [[Higher-Order Functions#fn:fold-right|fn:fold-right]], {{Function|Higher-Order Functions|fn:fold-left1}} (third example)
Care should be taken if a higher value is selected, as memory consumption and compile time will increase.
where $t/buyer/@person = $p/@id
return $t
return <item person='"{ $p/name/text() }'">{ count($a) }</item>,
(: rewritten to :)
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu