top | item 35447980

(no title)

aslatter | 2 years ago

From my fopen(2) docs:

m (since glibc 2.3)

Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)). Currently, use of mmap(2) is attempted only for a file opened for reading.

discuss

order

eklitzke|2 years ago

I'm very skeptical that this actually makes things faster. For one, zstd is definitely going to be CPU bound rather than I/O bound. But even if it wasn't, there shouldn't be a performance benefit to reading a file sequentially using mmap compared to reading it sequentially using read, which you can easily verify yourself by writing a small program that just reads files both ways.

dikei|2 years ago

I think for clear linux, it might be for memory saving in constraint devices rather than for speed optimization.