xsl-list
[Top] [All Lists]

Re: [xsl] Re: Will Saxon 9 optimize or cache this so performance doesn't degrade?

2013-02-06 02:19:37

On 06/02/2013 08:09, Andrew Welch wrote:
What's a memo function?
A function that will always return the same result for the same set of
arguments.

eg if you had a function that added 1 to a number, you can make it a
memo function so the 2nd time it gets called with the same number, it
will return the known previous result from a map, rather than compute
it again.

More specifically a deterministic or pure function is one that will always return the same result for the same set of arguments. A memo function is one that takes advantage of this property by caching the result of previous evaluations. You can declare a function as a memo function in Saxon using the attribute saxon:memo-function="yes".

Michael Kay
Saxonica



--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>