News for hackers. Stuff that matters.
Re:Is Rust faster than C? by dmitrygr on Wednesday January 14, 2026 @09:53PM (#46627463)
Do you not use restrict in your normal everyday C code that you write? I use it in my normal C code.
Re:Is Rust faster than C? by kouteiheika on Wednesday January 14, 2026 @11:54PM (#46628212)
I used to use it, but very rarely, since it's instant UB if you get it wrong. In tiny codebases which you can hold in your head it's probably practical to sprinkle it everywhere, but in anything bigger it's quite risky.

Nevertheless, I don't write normal everyday C code anymore since Rust has pretty much made it completely obsolete for the type of software I write.

Re:Is Rust faster than C? by kazinator on Thursday January 15, 2026 @03:08AM (#46629564)
restrict works by making some situations undefined behavior that would otherwise be defined without it. It is probably unwise to use casually or habitually.