"Matt J" wrote in message <kdpja4$jnk$1@newscl01ah.mathworks.com>...
>
> Don't you mean, that optimization cannot be carried out in the *latter* example? I can see for example why
>
> A=B(1,idx)*C
>
> might have to extract B(1,idx) to a continguous memory block when C is a matrix. In that case the elements in B(1,idx) will be accessed many times.
I'm talking about accessing memory of the result, meaning lhs.
Bruno
>
> Don't you mean, that optimization cannot be carried out in the *latter* example? I can see for example why
>
> A=B(1,idx)*C
>
> might have to extract B(1,idx) to a continguous memory block when C is a matrix. In that case the elements in B(1,idx) will be accessed many times.
I'm talking about accessing memory of the result, meaning lhs.
Bruno