| ▲ | Someone 4 hours ago | |
https://iliazeus.lol/articles/js-string-optimizations-en/ “The ECMAScript standard defines a string as a sequence of 16-bit elements. But in a lot of cases, storing 2 bytes per character is a waste of memory. In fact, quite a lot of strings in most code will be limited to ASCII. That is why V8 has both one-byte and two-byte strings” https://github.com/v8/v8/blob/main/src/objects/string.h confirms that. | ||