xsl-list
[Top] [All Lists]

Re: [xsl] how to split word into sequence of letters

2012-08-18 11:18:53
On Sat, Aug 18, 2012 at 8:41 AM, Mukul Gandhi 
<gandhi(_dot_)mukul(_at_)gmail(_dot_)com> wrote:
Hi Dimitre,

On Sat, Aug 18, 2012 at 9:03 AM, Dimitre Novatchev 
<dnovatchev(_at_)gmail(_dot_)com> wrote:
    for $c in string-to-codepoints($s) return codepoints-to-string($c)

can be much more efficient (linear time complexity) than the above
expression that calculates substring N times. (O(N^2) in the absence
of a good optimizer).

It's nice to know, that we can compare time complexity at this
granularity of API usage :)


Agreed. Not only nice, but mandatory, when developing something serious.


Cheers,
Dimitre.

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