Hacker News new | past | comments | ask | show | jobs | submit login

I think that's the misleading perspective the grandparent comment is referring to. An if statement in C isn't necessarily a branch. The generated assembly assembly might have no branches if it's eliminated, it might have multiple branches, and the compiler might even include a function call (e.g. fharden-conditional-branches). You can't know just by looking at the source code alone.

I've found that I'm much less accurate when writing code for non-GCC/Clang compilers because my mental model of what's going to be generated isn't accurate enough without the years of experience I've had looking at the outputs of those specific compiler families.




While true, compared to some of the other languages C code is still relatively close to source, e.g. it will not completely change your data types behind your back etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: