You can try std::deque as it allows non-contiguous memory while retaining almos all speed of arrays.
Cache coherency can be a bitch sometimes, and not having it can really slow down a program. I wouldn't say "almost" the speed, because the difference can be a lot.
Cache coherency can be a bitch sometimes, and not having it can really slow down a program. I wouldn't say "almost" the speed, because the difference can be a lot. Cache coherency
Depending on one block size. Generally, proper deques are optimised to minimize perfomance impact.
No matter what, he is not going to have 4GB array. Deque is as close as he is going to get (sequental, random access)
some other part of the code actually needs that much
At the same time? I do not believe that you cannot separate calculations on several steps and have only relatively small amount of data in memory at the time.