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

> Really, think about it. How often do you see somebody inexperienced use ifs instead of a switch? This pattern is common enough for most compilers to recognize, and more importantly, optimize it.

This made me chuckle. Playing dumb so that gcc optimizes you away is both hilarious and genius



Actually the compiler converts the switch to ifs not the other way around.




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

Search: