"Performance: Vectorized code often runs much faster than the corresponding code containing loops."

as to WHY vectorized code is faster, well, I think only person who can answer thisfor sure, is someone working inside Matlab, in the run-time/compiler group.

But simply googling "matlab why is vectorized faster" I see many well reasonedanswers there all over the web on this. I only see sites showing thatvectorized code is not always faster the loops. I seem to remember thatfew years ago MW did improvement to their jit compiler to improve loopspeeds, so the difference is not that much. I would guess it depend onthe code being processed each time.