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

TLDR: it is the same, like it should.

We are in 2020. Don't shift by 1 instead of /2 if you mean to /2.



lol... if you care about optimizing, you should care about all possible optimizations... (even if most of today's platforms don't)


Yeah but you should also then understand what will yield real results, and >>1 instead of /2 has become useless to write manually a long time ago, whereas e.g. continuous memory is more important than ever. You will not optimize a lot by attempting micro techniques from 30 years ago.

Other random example: in some edge cases, integer division replacement by a multiplication can still be relevant today (depends on if its a constant, the compiler, and if nothing optimized also on the exact processor, though, because last models are already ultra-fast with the real integer divide instructions), but I suspect in 15 years (maybe even 10) this will be completely irrelevant, at least for high perf targets.




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

Search: