News for hackers. Stuff that matters.
Re:Rust is now overall faster than C in benchmarks by dodobirdlord on Sunday January 03, 2021 @07:40PM (#25626762)
> That is the difference between C and Rust to me: for each fast Rust program you are guaranteed that you can write an equivalent performant program in C (or assembly). Worst case scenario you use inline assembly in C and you get that.

Rust also allows inlining assembly.

> Thus the contrary cannot be true for Rust: if I give you a heavily optimized C program not always you can produce an equivalent version in Rust.

This is incorrect for the reason above. Worst case scenario you just inline assembly in Rust to reproduce exactly the same performance of any arbitrarily optimized C program.

There are no comments on this comment yet.