Your library module is still just functions, so they can also be optimised and inlined. If they are written in XQuery then the XQuery processor needs to support/offer that optimisation, if they are written in Java (or other) as processor extensions then it is likely that the Java compiler/JIT (or other) will perform that optimisation.
On 28 June 2015 at 20:05, W.S. Hager <[email protected]> wrote: > Sorry, I didn't mention I was thinking about the case where I would create a > library module instead of using inline functions. > > 2015-06-28 21:01 GMT+02:00 Michael Kay <[email protected]>: >> >> >> > On 28 Jun 2015, at 19:32, W.S. Hager <[email protected]> wrote: >> > >> > One more consideration: function calls seem to be more expensive than >> > inline expressions. >> >> Saxon and I’m sure other products will inline function calls when they >> consider it appropriate. Because XQuery is side-effect-free and has no >> polymorphism, this is a pretty straightforward optimization. >> >> >> > And then there's that baggage of a custom library... >> > >> >> I’m not sure what you’re referring to here. >> >> Michael Kay >> Saxonica > > > > > -- > > W.S. Hager > Lagua Web Solutions > http://lagua.nl -- Adam Retter skype: adam.retter tweet: adamretter http://www.adamretter.org.uk _______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
