Re: How do you copy an array?



Barry Margolin wrote:

You could use displaced arrays:


Completely at a tangent, but displaced arrays probably have exciting
performance implications because of aliasing &c. Though it may
actually be that there isn't an issue because you can always tell early
enough whether or not two arrays share storage that you can raise it
out of any loop (in fact that must be the case I think). I guess
serious compilers would then have to be willing to generate different
code paths for the two cases though.

--tim

.