|
|
|
|
|
by majewsky
3344 days ago
|
|
What makes ripgrep fast (AFAIK) is mainly using mmap() instead of open()/read() to read files, and relying on Rust's regex library that compiles regexes to DFAs which can run in linear time. Those are things that you can do just as well in C. To witness, https://github.com/ggreer/the_silver_searcher (aka "ag") is about as fast as ripgrep, but written in C. This is not to say that Rust does not have benefits. But the benefit is not "speed", but "speed plus security". |
|
http://blog.burntsushi.net/ripgrep/