aklepatc ([personal profile] aklepatc) wrote 2024-05-08 09:26 pm (UTC)

The way you doing it is "loosing" 2 machine words of memory (size of string). If you popped from the end of the slice instead then those 2 words would be reused the next time you append().

Go string is a pointer + length on the inside AFAIU. Hence 2 words.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting