Michael Ludwig wrote:
What I was referring to is the case of a large node-set, say, 300
nodes, which you have to repeatedly search, say, at each of 300
iterations. I've seen a significant speed-up using key('bla', @id)
versus $bla[(_at_)id = current()/@id], which is, I think, one of the reasons
why keys exist.
And also the reason I wrote "unfortunate" in the above quote.
I see what you mean. And yes, when comparing keys to using variables,
then keys have the (big) advantage of (usually!, but don't try Altova,
because then it may well slow down instead) faster execution time.
On a side note: some processors are known to do internal optimizations
that are equal or even better then hand crafted key optimizations. I
believe for XSLT 1.0 the .NET processor is one of those highly optimized
ones, and for XSLT 2.0 I believe that Saxon starts to be increasingly
more optimized with each new version.
Cheers,
-- Abel Braaksma
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--