News for hackers. Stuff that matters.
Re:I stopped everything and started writing C again by igouy on Thursday March 13, 2025 @01:17PM (#43355374)
> Do you have any examples of C outperforming Rust?

I don't have a pony in that race.

> uutils/sort outperforms coreutils/sort by 6x

"He used the hyperfine command-line benchmarking tool to run a test ten times; sorting a text file containing all of Shakespeare's works to see which implementation was faster. The first time he performed the test, he used a debug build of the Rust version of sort. In that demo, Rust's version was 1.45x faster than the GNU version. Then he ran the test again using a non-debug version, which showed the Rust version performing the test six times faster than GNU's implementation."

Might it be that a new implementation in C would also have been faster?

Re:I stopped everything and started writing C again by nindalf on Thursday March 13, 2025 @01:49PM (#43355671)
Might not.

The Rust standard library has a state of the art sort implementation. There’s nothing faster, in any language - https://github.com/rust-lang/rust/pull/124032.

And sure, it’s possible that someone could write a C program that compares in speed to all the Rust programs I’ve mentioned. C is a Turing complete language after all. I’m only pointing out that it hasn’t happened in practice.

Also check the Android Binder code before (C https://github.com/torvalds/linux/blob/master/drivers/androi...) and after (Rust - https://android.googlesource.com/platform/frameworks/native/...). Same speed but the quality difference, it’s incomparable.

Re:I stopped everything and started writing C again by igouy on Thursday March 13, 2025 @02:08PM (#43355847)
> And sure, it’s possible …

Because anecdote. We can only know when the thing is designed as an experiment.

(All credit to who-so-ever is working to write improved versions.)

Re:I stopped everything and started writing C again by nindalf on Thursday March 13, 2025 @02:30PM (#43356027)
> Because anecdote

I don’t think anyone could have said something more rude or ignorant if they tried.

> designed as an experiment

Ha. As if you could design such an experiment. What, you’ll place two rats at a keyboard and ask them to implement grep? Bffr.

I’m pointing out the obvious - no one has actually written these mythical C programs that outperform Rust, to say nothing about security and reliability. You’ve deluded yourself into thinking that all it needs is “an experiment”. lol.

Re:I stopped everything and started writing C again by igouy on Friday March 14, 2025 @12:24PM (#43364161)
The quoted text seems dictionary definition anecdote.