Bug #2077
closedPerformance: $x[$x[$i]] with bytecode enabled
100%
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.
Updated by O'Neil Delpratt over 10 years ago
- Status changed from New to In Progress
I managed to reproduce the performance issue with the byte code generation feature on and I am now investigating it.
Updated by O'Neil Delpratt over 10 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
This bug has now been fixed. Major changes have been made to the FilterExpressionCompiler to better handle the predicate.
Updated by O'Neil Delpratt over 10 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 9.5.1.6
Bug fix applied in Saxon maintenance release 9.5.1.6
Please register to edit this issue