- The whole object and string representation thing is naïve to the point of total incorrectness. Where is the object and its length and type stored, for example? And browsers intern strings (store them once with garbage collection of some form to clear out the values when they are no longer needed) and don’t use null-terminated things (otherwise you couldn’t have "\0"), so your 320 bits is actually more likely to be 192 or 96, with the full 320 bits plus approximately three or six more words occurring only once. (I’m being a little vague about this because I’m not familiar with what specific techniques are actually used in browsers at present.) The end result of it all is that the actual figure will, I think, be more like 30–50 bytes per tile, not 60. (Then again, it may end up more, and it will definitely depend on the browser; I’m not up to date with the performance- and memory-efficiency techniques used.) I’m complaining here only because it’s misleading about how things are done; the concerns it raises are absolutely genuine.
- Bitwise operations on numbers are only 32-bit, not 64-bit. You want 64-bit bitwise operations? There’s no native support for it, you’ll need to emulate it. This is a part of the tangled mess that is a unified number type which can be either a 32-bit integer or a 64-bit floating point number.