For loop vs shape parameter

Yes, the loop approach is usually much slower, as it requires keeping track of more variables in the background and looses benefits from vectorization.

1 Like