Skip to content
Prev 31657 / 398506 Next

Loops and memory

Interesting.

The other day I was surprised by how much longer a for loop takes to
add two vectors a and b compared to a + b.  (I think that I made a and
b have a million entries.)

I guess my problem is that I don't really what the issues are, I guess,
so it's not clear to me when and where loops should be avoided.  I
guess I should try to get a copy of this new book to find out.

Thanks again.