News for hackers. Stuff that matters.
Re:&& operator chains (and ||, possibly) generates unoptimiz... by api on Monday March 29, 2021 @11:32AM (#26623278)
This is why I think Rust could eventually be faster than C and C++ for a lot of things. The work has to be done though. You're right that noalias enabled optimizations are neglected because you can rarely use them in C code.

On the Rust side I think the language needs some way to annotate if's as likely/unlikely. This doesn't matter in most cases but can occasionally matter a lot in tight high performance code. It can allow the compiler to emit code that is structured so as to cause the branch predictor to usually be right, which can have a large impact.

Re:&& operator chains (and ||, possibly) generates unoptimiz... by steveklabnik on Monday March 29, 2021 @11:33AM (#26623293)
Re:&& operator chains (and ||, possibly) generates unoptimiz... by drran on Monday March 29, 2021 @01:08PM (#26624938)
Why not just use PGO (Profile Guided Optimizations)?

Sadly, PGO does not work with cross-language LTO, because of conflict of LLVM module name ('Profile').