Subject: Re: [xsl] The time to execute a function is 625 times greater than the sum of the times to execute the statements in the function From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 1 Aug 2020 19:12:36 -0000 |
With performance the devil is always in the detail. Without knowing the detail, we can't help you find the explanation. It's not intrinsically surprising that two different ways of writing the same code should exhibit very different performance. If I were analyzing this myself, my next step would be to compare the Java execution profiles. They will be more difficult for you to understand, because they refer to internal routines within Saxon. But they may highlight whether there is a difference that leaps out at you. Michael Kay Saxonica > On 1 Aug 2020, at 20:03, Roger L Costello costello@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi Folks, > > I am having great difficulty determining why my XSLT neural network program runs so slow. I am currently focusing on the f:train function. The Saxon profile tool reports the gross total time for one call to the f:train function is 5,460.326 ms. > > To see how much time each statement in f:train takes, Michael MC<ller-Hillebrand suggested that I put each statement into its own function. Great idea! I did so. I ran the Saxon profile tool on the modified f:train and you can see below the gross total time required for each statement (each statement is now in its own function). I summed their times and it came to a total of 8.742 ms. So, the f:train function should take 8.742 ms but instead it takes 5,460.326 ms. How can it possibly be that the time to execute the f:train function is 625 times greater than the sum of the times to execute the statements in the function? Any suggestions? > > /Roger > > f:count-inputs-list 0.016 > f:create-inputs 0.039 > f:count-targets-list 0.004 > f:create-targets 0.520 > f:create-hidden-inputs 0.060 > f:create-hidden-outputs 0.058 > f:create-final-inputs 0.054 > f:create-final-outputs 0.008 > f:compute-output-errors 0.025 > f:compute-hidden-layer-errors 2.612 > f:compute-Ek_times_Ok 0.030 > f:compute-One_minus_Ok 0.017 > f:compute-updated-layer-values 0.003 > f:compute-output-transposed 0.003 > f:compute-weight-changes 0.003 > f:compute-learning-rate-multiplied-by-weight-changes 0.100 > f:compute-updated-who 0.034 > f:compute-Ek_times_Ok-v2 0.006 > f:compute-One_minus_Ok-v2 0.008 > f:compute-updated-layer-values-v2 0.006 > f:compute-output-transposed-v2 0.004 > f:compute-weight-changes-v2 0.004 > f:compute-learning-rate-multiplied-by-weight-changes-v2 0.060 > f:compute-updated-wih 0.027 > f:compute-neural-network-with-new-wih 4.959 > f:compute-neural-network-with-new-wih-and-new-who 0.085 > Total Time: 8.742
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] The time to execute a functio, Roger L Costello cos | Thread | Re: [xsl] The time to execute a fun, Graydon graydon@xxxx |
[xsl] The time to execute a functio, Roger L Costello cos | Date | Re: [xsl] The time to execute a fun, Graydon graydon@xxxx |
Month |