News for hackers. Stuff that matters.
Re:Learning to Read X86 Assembly Language by userbinator on Sunday November 27, 2016 @10:19PM (#13053183)
On the other hand, I find O0 is significantly worse than what even a novice human Asm programmer would do if asked to manually compile code, and O1 would be around the same as a novice human.
Re:Learning to Read X86 Assembly Language by 3chelon on Monday November 28, 2016 @12:03PM (#13056705)
Yes, I used to find that too. It's because, pre-optimization, on older architectures, the compiler outputs chunks of asm as if from a recipe book. Loads of unnecessary memory access, pointless moving data between registers, etc.

A proficient human coder, on the other hand, writes assembler that is partly optimized by default.

But few humans could write code like a seriously optimizing compiler, esp. on modern pipelined architectures - that stuff is unintelligible. Which is as it should be, because modern processors are not designed to be programmed directly by humans.