[xquery-talk] Matrix Multiplication

David Lee dlee at calldei.com
Wed Jan 1 07:54:42 PST 2014


On 31 Dec 2013 17:03, "jean-marc Mercier" <jeanmarc.mercier at gmail.com<mailto:jeanmarc.mercier at gmail.com>> wrote:
@David pairs are also basically needed to write a linear algebra modulus, the topic of this thread. And XQUERY don't provide any efficient pair. You can't use Marklogic map, or any other vendor map to store vectors for performance issues (a map is really slow).
http://x-query.com/mailman/listinfo/talk
[DAL:]
Just an FYI  but MarkLogic also have native arrays  (in addition to maps) which are extremely efficient (they are stored internally as C arrays).
But if you have to do a lot of iterating through the arrays  - even though the accessors are very efficient ,
the surrounding FLOWR code is still XQuery which slows things down a bit.   Maybe or maybe not enough to make them not useful for you.
Also the marklogic maps are not the same as XQuery 3 implemented maps, they are a hash map under the hood and typically linear access.

But back to your original issue, these are vendor extensions and hence not portable to other implementations (Until XQuery itself
standardizes on arrays and maps - then it is likely that vendor extension implementations will be used to expose the standard interface).
If what you want is pure XQuery ... it doesnt matter how fast these are if you cant use them because they dont exist in all implementations.


-David



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20140101/6b396b14/attachment.html>


More information about the talk mailing list