What are bitwise operators?

后端 未结 9 2011
闹比i
闹比i 2020-11-22 02:05

I\'m someone who writes code just for fun and haven\'t really delved into it in either an academic or professional setting, so stuff like these bitwise operators really esca

9条回答
  •  庸人自扰
    2020-11-22 02:33

    I kept hearing about how slow JavaScript bitwise operators were. I did some tests for my latest blog post and found out they were 40% to 80% faster than the arithmetic alternative in several tests. Perhaps they used to be slow. In modern browsers, I love them.

    I have one case in my code that will be faster and easier to read because of this. I'll keep my eyes open for more.

提交回复
热议问题