3 ms·
Obviously I mean get at the address of the first character, if any. You can't load before you know that what you load is valid. Btw. zero-terminated strings all
by jstimpfle 4y ago
Obviously I mean get at the address of the first character, if any. You can't load before you know that what you load is valid. Btw. zero-terminated strings allow you to load unconditionally. Sometimes that's nice.
- thaumasiotes 4y agoOK, but now the difference in how complicated it is to read from the string boils down to this: 1. Read the first chunk of the string length. 2. Is it more than 0? vs 1. Read the first chunk of the string length. 2. Did we get the whole thing? 3. Is the length more than 0? That extra step in the variable-length case means checking whether a bit is set in the value you just read. --- Also, it occurs to me that this whole discussion is talking about how to serialize or deserialize a string, when the original discussion is over how the string should be represented in memory.