Expand description
Uses Mmap
to map a file into memory with kernel support.
Choose this implementation if:
- Your platform supports memory maps.
- The input data is in a file or comes from standard input: a) if from a file, then you can guarantee that the file is not going to be modified in or out of process while the input is alive; b) if from stdin, then that the input lives in memory (for example comes via a pipe); input from a tty is not memory-mappable.
§Performance characteristics
A memory map is by far the fastest way to process a file. For some queries it is faster by an order of magnitude to execute the query on a memory map than it is to simply read the file into main memory.
Structs§
- Mmap
Input - Input wrapping a memory mapped file.