- markup (52)
- xml (7)
- xslt (21)
- atom (8)
- overlapping markup (2)
- schema (9)
- creole (4)
- xforms (1)
- pipelines (7)
- coding (2)
- dtll (1)
- genealogy (3)
- gtd (1)
- hardware (1)
- legislation (1)
- ontologies (2)
- unicode (1)
- web (24)
- google (3)
- rdf (6)
- rest (3)
- wikis (1)
- work (1)
- xpath (1)
- xquery (1)
- xtech2008 (3)
- life (26)
- children (5)
- equality (6)
- environment (4)
- gadgets (5)
- software (3)
- xlinq (2)
- conferences (7)
- xtech (6)
- blog (7)
- drupal (3)
Re: Memoïzation (Re: Levenshtein distance in XSLT 2.0)
Actually, Saxon has a
saxon:memo-functionextension attribute that you can use to indicate that a given function should be memoised. In this case, addingsaxon:memo-function="yes"to the naive implementation makes it function a lot better (eg comparing two 50-character strings in 2430ms), but not as well as the dynamic programming method (which compares them in 113ms).I think that since memoisation is purely to do with performance, rather than functionality, it doesn’t belong in an XSLT spec. An XSLT processor could currently do automatic memoisation of certain functions or templates if it thought it could detect ones where it would lead to a performance improvement.