Re: [xsl] Performance improvement for a recursive function?

Subject: Re: [xsl] Performance improvement for a recursive function?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 13 Dec 2011 14:52:21 +0000
On 13/12/2011 14:32, Manfred Staudinger wrote:
Hi Michael,

On 13/12/2011, Michael Kay<mike@xxxxxxxxxxxx> wrote:
to process 41337 path commands it takes 861 sec! The first 5000 path
commands are processed in 14 sec (at 355.87 per sec) the last 5000
take 671 sec (only at 7.5 per sec).
I'm seeing an execution time of about 90 seconds under Saxon-EE
9.3.0.11, down to 23 seconds under Saxon-EE 9.4.0.1
What baffles me is that with each tail-recursion it takes longer to
execute the function! Do you see this also with 9.4? Any idea about
the possible reason?

Sorry, haven't studied the problem in enough detail to answer this. The 9.3 code is clearly suboptimal, and is fixed in 9.4, which is all I really needed to establish.

Michael Kay
Saxonica

Current Thread