W3C home > Mailing lists > Public > public-xslt-40@w3.org > January 2021

Re: improvements to fn:sort functions

From: Michael Kay <mike@saxonica.com>
Date: Sat, 16 Jan 2021 11:50:08 +0000
Message-Id: <D4D478EC-C215-4975-9382-8CB9F6A49DF5@saxonica.com>
Cc: (wrong string) √ľn <cg@basex.org>, public-xslt-40@w3.org
To: Mukul Gandhi <gandhi.mukul@gmail.com>
> 
> From simply a theoretical point of view (and particularly, when the sequence to be sorted is quite large), I think that doing fn:reverse after doing fn:sort would certainly be more time consuming (than fn:sort flagged with 'descending').
>  
> [1] https://www.w3.org/TR/xpath-30/#id-arithmetic <https://www.w3.org/TR/xpath-30/#id-arithmetic>
> 

That depends entirely on implementation. There are possible implementations of lists where fn:reverse() just involves flipping one bit.

Michael Kay
Saxonica


Received on Saturday, 16 January 2021 11:50:24 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 16 January 2021 11:50:25 UTC