Top
Best
New

Posted by jxmorris12 15 hours ago

Ripgrep is faster than grep, ag, git grep, ucg, pt, sift (2016)(burntsushi.net)
292 points | 129 commentspage 3
travisdrake 9 hours ago|
still a good read
brtkwr 11 hours ago||
Hasn’t someone rewritten ripgrep in rust by now? C’mon it’s 2026. Oh wait it was written in Rust (back in 2016).
masklinn 11 hours ago||
The fun part is it is pretty easy to “rewrite” ripgrep in rust, because burntsushi wrote it as a ton of crates which you can reuse. So you can reuse this to build your own with blackjack and hookers.
SAI_Peregrinus 8 hours ago|||
A "ton of crates" is IMO the best way to write large Rust programs. Each crate in Rust is a compilation unit, the equivalent of one `.c` file in C. If they don't depend on one another, each crate can be compiled in parallel. It makes building the whole project faster, often significantly so. As with anything one can take it too far, but as long as each crate makes sense as an independent unit it's good.
loeg 7 hours ago||
Isn't creating a bunch of crates pretty annoying, logistically (in terms of mandatory directory structure and metadata files per crate)? (Compared with C/C++ individual .c/.cpp files being compilation units.) And does parallel compilation of crates break LTO?
mijoharas 9 hours ago|||
Gotta add a +1 for this. I wanted to do some ignore files etc for a project.

I thought "well I kinda want to do what rg does". Had a little glance and it was already nicely extracted into a separate crate that was a dream to use.

Thanks @BurntSushi!

qudat 11 hours ago|||
Waiting for the zig port
vortegne 11 hours ago||
https://github.com/alexpasmantier/grip-grab

Someone kinda did

brtkwr 9 hours ago||
looks abandoned. last commit was 2 years ago.
TacticalCoder 10 hours ago||
And burntsushi is one of us: he's regularly here on HN. Big thanks to him. As soon as rg came out I was building it on Linux. Now it ships stocks with Debian (since Bookworm? Don't remember): thanks, thanks and more thanks.
aldanor 9 hours ago|
Big thanks to him indeed (and for other projects in Rust space as well).

// really hoping openai wouldn't now force him to work on some crappy codex stuff if he stays there / in astral.

jedisct1 10 hours ago||
ugrep is my daily driver. https://ugrep.com

The TUI is great, and approximate matches are insanely useful.

dinkumthinkum 9 hours ago||
There is also upgrep, which is quite a good project. https://github.com/Genivia/ugrep
vintagedave 8 hours ago||
I recall that it was also very close in performance. When it was posted here, it beat ripgrep! https://news.ycombinator.com/item?id=38819262
infocollector 5 hours ago||
This is what my default grep is. You probably want to update your comment to reflect the correct name. (ugrep)
dist-epoch 12 hours ago||
(2024) gg: A fast, more lightweight ripgrep alternative for daily use cases

https://reddit.com/r/rust/comments/1fvzfnb/gg_a_fast_more_li...

keybored 12 hours ago|
> > IMO, as long as the time differences remain small, I'm totally okay with ripgrep being slower by default on smaller corpora if it means being a lot faster by default on bigger corpora.

Also something-something about dependencies (a Rust staple): https://www.reddit.com/r/rust/comments/1fvzfnb/gg_a_fast_mor...

masklinn 11 hours ago||
Note that this is the author of ripgrep replying to a third party commenter asking whether rg isn’t already lightweight, and comparing the two under various possible definitions of “lightweight”.
keybored 3 hours ago||
Yes.
sy0115 4 hours ago||
[dead]
devnotes77 8 hours ago||
[dead]
rsmtjohn 8 hours ago||
[dead]
derodero24 10 hours ago|
[dead]
More comments...