Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Out of curiosity, is there a better approach than memory maps?


The author goes over that here:

https://blog.burntsushi.net/ripgrep/


Using 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-frea...).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: