According to the documentation and this MATLAB answer, functions are generally faster than scripts. However, I can't seem to find a source explaining why this is true. Why are functions generally faster?
MATLAB: Details on why functions are faster than scripts
functionsscriptspeed
Best Answer