3 ms·
Looks cool! I'm curious why you chose to use read for small files and mmap for large files. I haven't really used mmap much yet, but my understanding is that it
by Zambyte 9mo ago
Looks cool! I'm curious why you chose to use read for small files and mmap for large files. I haven't really used mmap much yet, but my understanding is that it's just better at random access patterns, and read / write is better at sequential access patterns. Did you observe higher speeds with mmap above a size threshold? Did you try playing around with the Reader buffer to see if you could get better throughput with that? Also have you played around with std.Io in 0.16.0 yet? They recently merged in an API for mmap.