News for hackers. Stuff that matters.
Re:But I was helping the compiler by remar on Friday August 21, 2020 @03:29PM (#24238084)
Do you have a quick explanation or resource that explains why [1] is true?

Just curious as I've wanted to get better at being able to understanding assembly output by gcc/clang but don't think I've come across this advice explicitly before.

Re:But I was helping the compiler by tylerhou on Friday August 21, 2020 @03:59PM (#24238336)
I should maybe rephrase [1] to: if you're deciding between two different ways of writing the same function for performance reasons, you should use the optimized assembly output to decide (or the same compiler flags as what you use in production). There can be big differences between the unoptimized and optimized code: https://godbolt.org/z/fszhjj.

Unoptimized assembly IS useful if you just want to learn or understand assembly itself.