Re: A question about performance, using the Saxon Profile tool
Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]>
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
In principle yes. But there are lots of things that can create apparent anomalies in the results. Lazy evaluation in particular has a very distorting effect: a function call may return an iterator, and the real work of processing the iterator is then done in the parent function, so your calling function might actually be doing a lot more than making three function calls. The -TP tool is an excellent way of identifying where the expensive parts of your code are, but don't over-interpret the results. Michael Kay Saxonica > On 22 Jul 2020, at 22:45, Dr. Roger L Costello <[email protected]> wrote: > > Hi Folks, > > This is a question about performance. In particular, about the Saxon Profile tool. > > I have a function matrix:create. The profile tool says this about its performance: > > Average time (net/ms): 0.007 > > The matrix:create doesn't call any other function. So, the average time required for matrix:create to do its thing is 0.007 milliseconds. Right? > > Next, I have a function f:neuralNetwork that calls matrix:create. Suppose f:neuralNetwork calls matrix:create three times. And that's all f:neuralNetwork does. Then the time to execute f:neuralNetwork should be about: 3 x 0.007ms = 0.021ms, right? Well, perhaps a tiny bit more, to account for the overhead of making the function calls, so let's say the total time is 0.023ms. Does that sound about right? > > /Roger > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help