Assuming that the type of
argsis inferred, can I count on the compiler to constant prop the computation ofXaway so that it does not appear in the compiled code?
Generally yes for things that are specialized on (like types). Use Cthulhu to see what the compiler is actually doing with your code.