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

Whether or not it's an early optimization depends on when you add the __builtin_expect, no? Perhaps you already have identified a very hot branch in your code that the compiler fails to treat correctly even though you provided it with profile data.


Except that anything newer than 1995 probably ignores the hint provided by __builtin_expect, and you'd probably have more luck changing the algorithm or vectorizing the code.




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

Search: