Category Archives: Performance Optimization

Recursion with anonymous (inline) functions in XPath 3.0 — Part II

In my first post about implementing recursion with anonymous functions I provided the following example: let $f := function($n as xs:integer, $f1 as function(xs:integer, function()) as xs:integer ) as xs:integer {if($n eq 0) then 1 else $n * $f1($n -1, … Continue reading

Posted in Higher Order Functions, Performance Optimization, XPath 3.0 | 7 Comments

Fizz Buzz with XPath 2.0/3.0

A few days ago Jim Fuller asked on Twitter: @xquery fizz buzz with xquery http://bit.ly/wC6Ra5 can anyone come up with a faster version ? #xquery9:00 AM Feb 26, 2012 Here are my two answers in the categories: 1) Elegant; 2) Fast … Continue reading

Posted in Performance Optimization, XPath, XPath 3.0, XSLT 2.0, XSLT 3.0 | 3 Comments

Optimized Repetitive Prepends, Part III: Understanding the Solution

  Technorati Tags: performance optimization, algorithms, algorithmic complexity, functional programming In Part II of this post a solution was given to the problem presented in Part I: "Can we implement an algorithm for repetitive prepends that will be run by … Continue reading

Posted in Performance Optimization | Leave a comment

Performance Feat: Eliminate a dimension of complexity in XSLT Processor’s repetitive prepends. Part II: The Solution.

Technorati Tags: Performance optimization, algorithmic complexity, XPath sequence operationsTechnorati Profile Update: Minor code cleanup (using better names now). In my previous post I defined the problem of improving the quadratical performance of an XSLT processor P1 when performing repetitive prepends … Continue reading

Posted in Performance Optimization | Leave a comment

Performance Feat: Eliminate a dimension of complexity in XSLT Processor’s repetitive prepends. Part I: The Problem.

Update: Minor code cleanup. Prepending a list xs with a list ys to obtain the concatenation (of ys ++ xs )  of the two is usually a cheap operation which, when done non-destructively, requires only to copy the list ys … Continue reading

Posted in Performance Optimization | Leave a comment