2 ms·
You are acting as if these are the same thing. ripgrep has more features than grep and that is going to take more code. At the very least you can drop the print
by kevincox 6y ago
You are acting as if these are the same thing. ripgrep has more features than grep and that is going to take more code. At the very least you can drop the printer and ignore crates. You are still looking at twice the code but ripgrep is doing parallel searching so it is obviously going to be more. How much more is hard to say without trying to rewrite one or the other to make this an apples-to-apples comparison.
And even if it results in 1-2x amount of code that is not the end-all metric. How quickly was this code written and how easy is it to maintain? How many bugs does it have?
I mean rust is basically a superset of C (other than having to write "unsafe" everywhere if you use a c-style), so it is hard to dismiss this as wasted noise because if it was wasted wouldn't people have written it like C line-for-line?