Actions
Bug #2077
closedPerformance: $x[$x[$i]] with bytecode enabled
Start date:
2014-05-20
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
From Gunther Rademacher on saxon-help list
Recently I ran some tests with a REx parser on Saxon-EE and I noticed a
performance degradation that occurs with -opt:10, when byte code is
generated.
Tried to isolate it as much as possible, which resulted in the small
program below. The $x[$x[$i]] construct presumably causes the
degradation, something similar is used in a REx lexer's state machine.
declare variable $n external;
declare variable $x := 1 to $n;
avg(for $i in $x return $x[$x[$i]])
With $n=65536, it executes in about 8 milliseconds. Unless byte code
generation is in effect, in which case it takes 8 seconds.
Please register to edit this issue
Actions