5 ms·
Out of curiosity, is there a better approach than memory maps?
by BeeOnRope 8y ago
Out of curiosity, is there a better approach than memory maps?
- shaklee3 8y agoThe author goes over that here: https://blog.burntsushi.net/ripgrep/ https://blog.burntsushi.net/ripgrep/
- hungnmsu 8y agoUsing mmap is generally slower than reading chunk of data and mmap does not work well if you have to handle huge files with several GBs of text data. You can find performance benchmark results and a detail analysis from @burntsushi blog and Lemire's blog post (https://lemire.me/blog/2012/06/26/which-is-fastest-read-fread-ifstream-or-mmap/ https://lemire.me/blog/2012/06/26/which-is-fastest-read-frea...).