News for hackers. Stuff that matters.
Re:&& operator chains (and ||, possibly) generates unoptimiz... by MaxBarraclough on Monday March 29, 2021 @05:32PM (#26628439)
> the tired meme of "the compiler generates better assembly code than a human"

This seems incomplete. Which human? The average software developer? That doesn't say much. Few developers have the necessary expertise. Expert assembly programmers are often able to outperform compilers.

Re:&& operator chains (and ||, possibly) generates unoptimiz... by jlcummings on Monday March 29, 2021 @05:47PM (#26628625)
Better wouldn’t necessarily be the right qualifier, but faster, typically more repeatable, and greatly more economical with scale/workload would certainly fit as better from different vantages.

With high novelty? Probably not until machine learning and compilers are deeply entangled.

Re:&& operator chains (and ||, possibly) generates unoptimiz... by slaymaker1907 on Monday March 29, 2021 @06:33PM (#26629139)
That very much depends on the code. Program synthesis is an active area of research and the programs found would often be very difficult for a human to figure out. Of course a sufficiently determined human can always do whatever these programs do, but I do think it is unfair to give an unlimited amount of time to human optimizers.