Description
Julia is highly flexible with the possibility of setting lots of optional options via the so called kwargs (keyword arguments), but I learn from experience that this may come at a highly cost in terms of compilation. It only takes to call with an option with different types (when allowed by the function's API) or even making the same call with a different order and, bang, a new instance of function is compiled again. This all ads up in memory consumption, and even worst it piles up in the pre-compiled cache. Te only workaround I found is to try to create tinny wrapper functions that only deal with the kwargs parsing. Though not avoid the multiple compilation, at least it multiple compiles tiny functions. But this is easier to say than to do.
This issue tracks a random list of functions that can be changed, even if only partially, to follow this strategy.
- maregrams and the
list
option