3 ms·
Memory mapping (at least on Linux) isn't actually faster than reading the file manually. Especially if you use appropriately sized buffers. (Of course, the fi
by eru 3y ago
Memory mapping (at least on Linux) isn't actually faster than reading the file manually. Especially if you use appropriately sized buffers.
(Of course, the five times in a row might mess with that.)
- Animats 3y agoRight, it's the five times in a row thing that makes an in-memory solution faster. Otherwise, this is a purely sequential one-pass problem, which is how you'd do it in practice. Parallelism with edge effects is pretty common. Weather simulation, finite element analysis, and big-world games all have that issue. The middle of each cell is local, but you have to talk to the neighbor cells a little.