And you always start off knowing the total length of the array, and the width of the datatype.
Actually deciding what to do with that information without incurring a bunch more cache misses in the process may be tricky.
Actually deciding what to do with that information without incurring a bunch more cache misses in the process may be tricky.
Depending on the problem space such assumptions can prove right enough to be worth using despite sometimes being wrong. Of course if you've got the compute to throw at it (and the problem is large) take the Contact approach: why do one when you can do two in parallel for twice the price (cycles)?