Does passing a dataframe declared outside a function as an argument improves performance?

DataFrame is type unstable, so the performance should not be affected as I have commented above.
(passing it to a function might give time improvement of nanosecond order as it will avoid dynamic dispatch in the function scope, but it will not be noticeable in practice)

However, what @DNF comments it indeed a valid general recommendation in Julia and should be followed.

1 Like