What algorithms are used in ripgrep ? #2225
-
Hello i want to ask a different question. So There must be something , architecture, algorithms used in ripgrep , that is contributing to speed factor. Would you please give me knowledge to it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.” The problem is, you haven't scrutinized the assumptions you're making. For example, ripgrep is written in Rust and Rust is not a dynamic language. In fact, any cursory research on Rust should lead you to the quick conclusion that one of its design goals is to be as fast as C. Rust borrows the "zero cost abstractions" design philosophy that C++ has.
When I first released ripgrep, I wrote a blog post introducing it with benchmarks and a fairly detailed analysis. The blog post is linked in the README. Please read that first. If you still have specific questions after reading that, feel free to ask them here. |
Beta Was this translation helpful? Give feedback.
-
Sir, Thank you for your awesome work for community. |
Beta Was this translation helpful? Give feedback.
“When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.”
The problem is, you haven't scrutinized the assumptions you're making. For example, ripgrep is written in Rust and Rust is not a dynamic language. In fact, any cursory research on Rust should lead you to the quick conclusion that one of its design goals is to be as fast as C. Rust borrows the "zero cost abstractions" design philosophy that C++ has.
When I first released ripgrep, I wrote a blog post introducing it with benchmarks and a fairly detailed analysis. The blog post is linked in the README. Please read that first. If you stil…