Subject: bug#58669: 28.2; bindat: str and strz not operating on vectors

From: Stefan Monnier <[email-masked]>
Date: Fri, 21 Oct 2022 12:47:37 -0400

>> Yes, I'm actually surprised I left this code in there as-is because
>> I remember wondering how to make a unibyte string from a vector of bytes
>> in an efficient way (and concluding that there's currently no good way
>> to do that :-( ).
>
> Maybe I'm missing something, but what's wrong with
>
>   (apply 'string (append VECTOR nil))

`append` takes the vector, turns it into a list (thus allocating N cons
cells), then `apply` turns the list back into an on-stack "vector", and
all of that just to create a 4x or 8x smaller string.  It's silly.

        Stefan