Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do doubt that even for a for(;;), a jmp (x86) is use instead of a conditional jump like jz.


Compilers are smart! For common things like this, they will easily optimise away any conditional jumps.


It is, you can easily check that yourself. for(;;) compiles to exactly one jmp in GCC (tested with gcc 4.7.0)




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

Search: