4 ms·
When reading mostly sequentially, is a memory mapped file any faster than reading into a buffer? The data is presumably still copied into memory, it's just done
by sgtnoodle 6y ago
When reading mostly sequentially, is a memory mapped file any faster than reading into a buffer? The data is presumably still copied into memory, it's just done on a page fault rather than an explicit function call.
- deleted 6y ago[deleted]
- sgtnoodle 6y agoApparently there is one less memory copy when using mmap, since read() copies from the intermediate buffer that mmap provides access to. Neat! https://medium.com/@sasha_f/why-mmap-is-faster-than-system-calls-24718e75ab37 https://medium.com/@sasha_f/why-mmap-is-faster-than-system-c...