[Home] [By Thread] [By Date] [Recent Entries]
On 12.07.2020 22:47, Dr. Roger L Costello costello@xxxxxxxxx wrote:
Hi Folks, (-TP) option to generate a web page that shows the performance of each of my matrix operations. I found that my matrix addition function is taking an appallingly large amount of time. Below is my matrix addition function. Do you have suggestions on ways to improve its performance? /Roger $N/row[$i]/col[$j]"/> You could also try to key the row and col elements by their position e.g. <xsl:key name="row-by-index" match="Matrix/row">
<xsl:variable name="key" as="xs:integer">
<xsl:number/>
</xsl:variable>
<xsl:sequence select="$key"/>
</xsl:key> <xsl:key name="col-by-index" match="Matrix/row/col">
<xsl:variable name="key" as="xs:integer">
<xsl:number/>
</xsl:variable>
<xsl:sequence select="$key"/>
</xsl:key>
And of course in XPath 3/XSLT 3 there is the "for-each-pair" function made for tasks like this but I have no idea whether that would perform better. And to write it solely as a function expression you need XQuery or the XPath 4 extension function introduced in Saxon 10 to create elements.
|

Cart



