Efficiently passing a set of constants to a function

Thanks @DNF: I was wrong again. Julia is smart enough to not create an object here, but use the value directly:

f3(;cst=BigleafConstants()) = 2 * cst.g  # note constructor call
@code_llvm f3()   # return statement of a single value

where BigleafConstants struct is defined in the package, as in my example above.