btw, I am confused of "preserving an actual address does not seem to buy us much". Did you eventually used the address of the blob to write it as/to string?
Thank you for the great question, Yacob! Yes, I did use the address of the blob. What I meant by this sentence is that the address does not have to be converted into the string character by character, in other words it does not have to be human-readable.
btw, I am confused of "preserving an actual address does not seem to buy us much". Did you eventually used the address of the blob to write it as/to string?
Thank you for the great question, Yacob! Yes, I did use the address of the blob. What I meant by this sentence is that the address does not have to be converted into the string character by character, in other words it does not have to be human-readable.
ahh. yes. This is a great change you've done there. thanks for the post.
Thank you for your thoughtful comment and kind words, Yacob!
does this rely on SSO of std::string?
it's somewhat orthogonal. With SSO no allocation is involved but even without SSO there would be fewer bytes to copy, so it would still be a win :)