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

It especially seems religious to me because it's saying that somehow "/ 2" is simpler than ">> 1" because it has one less character for the symbol, and because division is a more commonly known operator to most people than bitwise shifting.

It seems to me that they are equally simple if we assume that programmers dealing with low level or performance intensive code know what a bitwise shift is and ignore the extra character, then they are literally equivalently complicated expressions with 1 symbol and 1 value applied to the symbol.



Code does not happen in a vacuum. Which is more understandable/simple depends on the domain of the code in question. Usually that's going to be the multiply or the divide.


Right, but my statement was that the domain would be low level or performance intensive code -- do you disagree that in that domain they are equally simple?




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

Search: