Hello Rob,
well, it is interesting that the optimizer is optimizing away every second function call. However, the problem here seems to be introduced solely by prof:dump() and I actually can understand that optimizing this is more complicated. Not saying that it couldn't be optimized (Christian know far, far more about this than I do), but if remove thr prof:dump() the query is optimized to the query "16", which I guess can't be further optimized.
And seeing that prof functions are for profiling and debugging and are usually not used in production, I think this could be considered a very minor issue.
Cheers Dirk
On 02/24/2015 12:43 PM, Rob Stapper wrote:
Hi guys,
While debugging a xquery-program I saw something strange behavior( to me anyway).
I reproduced it in the attached xquery-snipped.
Looking at the evaluation data in the query-info screen of the basexGUI after running the program, one can see that function $f($a) is evaluated more than ones.
The result is ok but I wondered if this would reduce the performance.
I'm running version 8.01 beta d13ddc7 in local GUI-mode.
Regards,
Rob Stapper
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware. http://www.avast.com