I'm storing a very large ( >1MB ) bitmask in memory as a string and am curious about how JS stores strings internally. I have the feeling, based on the fact that
String.fromCharCode( 65535 ).charCodeAt( 0 ) === 65535
, that all strings are unicode, but I'm not certain. Basically I'm trying to find out if it would be more efficient, in terms of memory usage, to bitmask against 16-bit characters than 8-bit characters?