Checking type stability on function with optional arguments does not show the whole picture
@code_warntype find_root(p, Newton(), -5.0, 5.0) # shows only the wrapper function which is stable
@code_warntype find_root(p, Newton(), -5.0, 5.0, 100, 0.95, 1e-12) # fully specified (shows type instabilities - also used in the eval)
The problem here is that the function is type stable in the way that the compiler knows the output type before execution, however the eval pipeline checks for all ::Any entries in the fully specified function, i.e. for runtime dispatches of which there are few. This leads to confusion based on what has been said in the lab.
Checking type stability on function with optional arguments does not show the whole picture
The problem here is that the function is type stable in the way that the compiler knows the output type before execution, however the eval pipeline checks for all
::Any
entries in the fully specified function, i.e. for runtime dispatches of which there are few. This leads to confusion based on what has been said in the lab.