Project

Profile

Help

Bug #1740

closed

Performance regression for $x[$i]

Added by Michael Kay over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2013-04-24
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Saxon 9.5 shows a performance regression when evaluating an expression such as

for $i in 1 to $n return $x[$i]

The cause is that the subscript expression is evaluated using a TailIterator, whose strategy depends on whether the iterator for $x is "grounded" or not. In this case the iterator is a ProgressiveIterator, which 9.4 decides is grounded, and 9.5 decides is not. In this instance the 9.4 strategy works better, despite forcing $x to be eagerly evaluated.

Reported by Gunther Rademacher on saxon-help list. See also MHK response on list.


Files

test.xq (1.05 KB) test.xq Test query and measurements Michael Kay, 2013-04-24 12:14

Please register to edit this issue

Also available in: Atom PDF