Hi Giuseppe,
The semantics of the used functions are slightly different, but I guess the differences in terms of performance should be rather marginal. Just in case: Have you have done some in-depth comparisons that I could have a look at? Did you work with large input files, or did you run the queries repeatedly and look at the average times?
Cheers, Christian
I have noticed different speeds when running the following functions (from slowest to fastest):
parse-json(unparsed-text('example.txt')) json-doc("example.txt") parse-json(file:read-text('example.txt'))
similarly for documents on the web:
parse-doc('http://example.com/text') parse-json(fetch:text('http://example.com/text'))
Does this make sense to you? Is there any recommendation to follow? Despite the runtime speed difference, I admit I love writing one single function (json-doc) to get map conversion. Everything is so immediate :)
Best, Giuseppe
Universität Leipzig Institute of Computer Science, Digital Humanities Augustusplatz 10 04109 Leipzig Deutschland E-mail: celano@informatik.uni-leipzig.de E-mail: giuseppegacelano@gmail.com Web site 1: http://www.dh.uni-leipzig.de/wo/team/ Web site 2: https://sites.google.com/site/giuseppegacelano/