[ANN] Higher-Order XQuery Modules

Thursday, 12 December 2013 · 4 messages · last reply 30 Dec 2013
LW
Leonard Wörteler12 Dec 2013 22:36 #
Hello everyone, I want to announce the small collection of XQuery 3.0 modules [1] that I've written over the last few weeks. I use them mostly for testing the BaseX optimizer, but there should be no BaseX-specific XQuery code in the repository. I have implemented some purely functional data structures including maps based on AVL and Red-Black Trees that both support arbitrary values as keys and efficient deletion. Some documentation can be found under each module's namespace URI or under [2]. Constructive feedback of any kind (suggestions, bug reports, pull requests) would be much appreciated. Hope you like it, cheers, Leo [1] https://github.com/LeoWoerteler/xq-modules/ [2] http://www.woerteler.de/xquery/modules/
JM
jean-marc Mercier29 Dec 2013 09:53 #
Leonard, Hello. I'am just reading this annoucement, trashed erroneously by gmail. Sorry for not having reacted before. It sounds very interesting. First probably stupid question : how do we "install" these modules ? 2013/12/12 Leonard Wörteler <leo at woerteler.de>
Quoted text · Leonard Wörteler · 25 lines
> Hello everyone, > > I want to announce the small collection of XQuery 3.0 modules [1] that > I've written over the last few weeks. I use them mostly for testing the > BaseX optimizer, but there should be no BaseX-specific XQuery code in the > repository. > > I have implemented some purely functional data structures including maps > based on AVL and Red-Black Trees that both support arbitrary values as keys > and efficient deletion. Some documentation can be found under each module's > namespace URI or under [2]. > > Constructive feedback of any kind (suggestions, bug reports, pull > requests) would be much appreciated. > > Hope you like it, > cheers, Leo > > [1] https://github.com/LeoWoerteler/xq-modules/ > [2] http://www.woerteler.de/xquery/modules/ > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
JM
jean-marc Mercier29 Dec 2013 15:52 #
Leonard, Hello. I just profiled your set collection at https://github.com/LeoWoerteler/xq-modules/ Results of the profile functions are attached below. The conclusion is that the overhead to pay by using your map, instead of "overloading" a vendor map solution based, as BaseX one, seems to be too heavy, at least for my purposes (the overhead to pay is around a factor 100). Please check these conclusions, but it seems that they are exactly the same than the map designed by John Snelson, and mine too (see the "map module for xquery?" thread at talk at x-query.com ). Note however that the performances of your tree are far better than John Snelson and mine, but still it is not enough. - To reproduce the test : launch MapProfiler.xquery. This xquery files links to your map "ordered-map.xqm", also to the ones that I designed on top of BaseX map ("idmap.xqm","set.xqm"), as well as the standard BaseX map. - The test consists simply in populating sets and maps of integers and nodes. Each test consists in inserting #nb=(2^i, i=10,..,20) of these objects and measuring time to build the map. - Note : I added two functions to your ordered map module :ordered-map:insert-pair, ordered-map:insert-pairs, to have an handy Constructor from pairs. I have checked that these Ctors are not responsible for the overhead, but check it again. Well, I am afraid that there might no be any XMas miracle: your tree seems to suffer from the very same problem than John Snelson and mine. I have no idea why we are facing these performance issues. Might it be due to XQUERY interpreter overhead, due to the query optimizer ? The only thing that is sure is that as long as this problem will hold, nobody will be able to contribute seriously to XQUERY via external XQUERY modules using heavy algorithmic. And this is too bad, because XQUERY could be a really efficient language to that purposes. If I misunderstood something, do not hesitate to comment. Cheers, Jean-Marc [image: Images intégrées 2] 2013/12/29 jean-marc Mercier <jeanmarc.mercier at gmail.com>
Quoted text · jean-marc Mercier · 37 lines
> Leonard, > > Hello. I'am just reading this annoucement, trashed erroneously by gmail. > Sorry for not having reacted before. > It sounds very interesting. > First probably stupid question : how do we "install" these modules ? > > > 2013/12/12 Leonard Wörteler <leo at woerteler.de> > >> Hello everyone, >> >> I want to announce the small collection of XQuery 3.0 modules [1] that >> I've written over the last few weeks. I use them mostly for testing the >> BaseX optimizer, but there should be no BaseX-specific XQuery code in the >> repository. >> >> I have implemented some purely functional data structures including maps >> based on AVL and Red-Black Trees that both support arbitrary values as keys >> and efficient deletion. Some documentation can be found under each module's >> namespace URI or under [2]. >> >> Constructive feedback of any kind (suggestions, bug reports, pull >> requests) would be much appreciated. >> >> Hope you like it, >> cheers, Leo >> >> [1] https://github.com/LeoWoerteler/xq-modules/ >> [2] http://www.woerteler.de/xquery/modules/ >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> > >
JM
jean-marc Mercier30 Dec 2013 09:20 #
Hi, I am republishing the "Profiler" results, after correction of a bug in the "idmap.xqm" code, kindly pointed out by Leo. Conclusions are unchanged. Cheers Jean-Marc[image: Images intégrées 1] 2013/12/29 jean-marc Mercier <jeanmarc.mercier at gmail.com>
Quoted text · jean-marc Mercier · 91 lines
> Leonard, > > Hello. I just profiled your set collection at > https://github.com/LeoWoerteler/xq-modules/ > > Results of the profile functions are attached below. The conclusion is > that the overhead to pay by using your map, instead of "overloading" a > vendor map solution based, as BaseX one, seems to be too heavy, at least > for my purposes (the overhead to pay is around a factor 100). Please check > these conclusions, but it seems that they are exactly the same than the map > designed by John Snelson, and mine too (see the "map module for xquery?" thread > at talk at x-query.com ). Note however that the performances of your tree > are far better than John Snelson and mine, but still it is not enough. > > > - To reproduce the test : launch MapProfiler.xquery. This xquery files > links to your map "ordered-map.xqm", also to the ones that I designed on > top of BaseX map ("idmap.xqm","set.xqm"), as well as the standard BaseX map. > - The test consists simply in populating sets and maps of integers and > nodes. Each test consists in inserting #nb=(2^i, i=10,..,20) of these > objects and measuring time to build the map. > - Note : I added two functions to your ordered map module > :ordered-map:insert-pair, ordered-map:insert-pairs, to have an handy > Constructor from pairs. I have checked that these Ctors are not responsible > for the overhead, but check it again. > > Well, I am afraid that there might no be any XMas miracle: your tree seems > to suffer from the very same problem than John Snelson and mine. I have no > idea why we are facing these performance issues. Might it be due to XQUERY > interpreter overhead, due to the query optimizer ? > > The only thing that is sure is that as long as this problem will hold, > nobody will be able to contribute seriously to XQUERY via external XQUERY > modules using heavy algorithmic. And this is too bad, because XQUERY could > be a really efficient language to that purposes. > > If I misunderstood something, do not hesitate to comment. > > Cheers, > > Jean-Marc > > > > > [image: Images intégrées 2] > > > > > > 2013/12/29 jean-marc Mercier <jeanmarc.mercier at gmail.com> > >> Leonard, >> >> Hello. I'am just reading this annoucement, trashed erroneously by gmail. >> Sorry for not having reacted before. >> It sounds very interesting. >> First probably stupid question : how do we "install" these modules ? >> >> >> 2013/12/12 Leonard Wörteler <leo at woerteler.de> >> >>> Hello everyone, >>> >>> I want to announce the small collection of XQuery 3.0 modules [1] that >>> I've written over the last few weeks. I use them mostly for testing the >>> BaseX optimizer, but there should be no BaseX-specific XQuery code in the >>> repository. >>> >>> I have implemented some purely functional data structures including maps >>> based on AVL and Red-Black Trees that both support arbitrary values as keys >>> and efficient deletion. Some documentation can be found under each module's >>> namespace URI or under [2]. >>> >>> Constructive feedback of any kind (suggestions, bug reports, pull >>> requests) would be much appreciated. >>> >>> Hope you like it, >>> cheers, Leo >>> >>> [1] https://github.com/LeoWoerteler/xq-modules/ >>> [2] http://www.woerteler.de/xquery/modules/ >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >> >> >

⚡Generated with XQuery