4 ms·
Javascript number type can be used like 32 bit integers for the most part, including bitwise operators and modulus. I agree that pure 32 and 64 bit integers wo
by mschuetz 8y ago
Javascript number type can be used like 32 bit integers for the most part, including bitwise operators and modulus.
I agree that pure 32 and 64 bit integers would be nice, though. Especially since I have need for 64 bit bitwise integer math. Bigint surprisingly seems to be able to do that, I'm just not sure if the performance will be okay.
But being able to use bigints with binary literals is awesome: 123n & 0b1111n => 11n