NSFW: Use cases for Bitwise operators in Js

added by JavaScript Kicks
11/30/2018 9:50:39 AM

474 Views

Bitwise operators in Javascript are mostly used for numerical convertions/computations, because sometimes they're much faster than their Math or parseInt equivalents. You can take a look at some benchmarks here. It's important to note, as pointed out by Mathias Bynens, that bitwise operations only work reliably on numbers that can be expressed as 32-bit sequences.


0 comments