When accessing an Array, arr[0], then addresses close to it (arr[1], arr[2], arr[3], ...) will be loaded into the cache line as well.
But how does it work with a HashMap, does the same thing happen? Or is it the same for all Collections?
If so, then a lot of cache misses would occur when accessing a HashMap not in an orderly way, right?
-edit-
I have read that a typical cache line is 64 Bytes long (but can be 32-128 Bytes too).
So if we have a struct > 64 Bytes, then the Cache Line won't be able to load the adjacent addresses as well. Is this the exact reason as to why we are advised to split our data into multiple Components and not to put everything together like in OOP?