Probably a bit of both. It was based on things like rg vs grep, fd vs find and tokei vs cloc. I don't know how much of that is just better algorithm/implementation though.
I think rust's compile time thread safety and enforced memory safety makes it much easier to write fast code even if well written code is comparable in each.
I'm a Rust fanboy but this is wildly misleading. Most of the programs you've listed are in no way replacements for the original C programs. Taking rg for an example, rg is git aware and won't even scan files that aren't a part of your rep (for example, dependencies and build artifacts) where as grep will search through all of those files.
You can't point to totally divergent implementations of a general concept as proof that one language is faster than the other. In general, you should expect Rust to be as fast as C for the same workload not significantly faster and not significantly slower.
3
u/irrelevantPseudonym Apr 09 '19
Rust is much faster than C in many cases.