Hacker News new | ask | show | jobs
by jdright 3459 days ago
And this is getting nauseating even to these wanting to give it a try. I'm in the step of walking away and forget about it until the dirt settles down (and it becomes at least as fast as C/C++ or... even Go)
2 comments

In general, if Rust is significantly slower than equivalent C or C++, that's a bug. We track them. Please file them.

Rust should be roughly the same, speed-wise.

I was competing against some C and C++ software developers in Advent of Code with efficient solutions, and my Rust solutions came out faster each time. Might want to check your facts.
That doesnt mean anything. Try a little real software for instance.
No, like: crypto, math, compression, encoding/decoding. Any example?
Very good example in fact. Seems roughly the same.
Like ripgrep?
Question, grep is multi-threaded?
GNU grep is not multi-threaded.

Since you chose to be cute, I'm going to take a guess that you think this means the comparison between the tools is unfair. If that's an accurate interpretation, then I will say that your question is irrelevant because ripgrep is faster or as fast as GNU grep on benchmarks using a single thread too. In fact, that's the whole point! It says so right in the project's README.

http://blog.burntsushi.net/ripgrep/#single-file-benchmarks

Ok, interesting analysis. I will look more on Rust and maybe try something myself. But by reading your other posts about optimizing Rust to do search, it seems to require a lot of experience to tune Rust code.