There is no evidence that vectorized code is faster in general.
If a build-in function can be applied to a complete array, a vectorization is much faster than a loop approach. When large temporary arrays are required, the benefits of the vectorization can be dominated by the expensive allocation of the memory, when it does not match into the processor cache.
A secondary effect of vectorizing is that the code looks clearer.
As the value of k increases the benefit that vectorization provides diminishes as it is no more possible to cache the large array. In order to be time efficient, we can better use data structures present in the MATLAB library like tall arrays or datastores.