3 ms·
This library is called bstrings, but Microsoft has BSTR/BStrings. Those are ucs-2/utf-16, zero terminated, with a length prefix. In Windows 8, someone at Micro
by asveikau 4y ago
This library is called bstrings, but Microsoft has BSTR/BStrings. Those are ucs-2/utf-16, zero terminated, with a length prefix.
In Windows 8, someone at Microsoft decided they had too many string types, so they introduced another one (HSTRING).
- djbusby 4y agoIn VB/ASP3.0 (Windows 2000) the VB string concat was very slow and I built a small class to just make them concat faster (pre-allocated buffer). Sped up those Response.Write() like 40x. While writing it I was surprised by all the text vs binary crap Windows does.
- asveikau 4y agoI wonder if they used BSTR. Which was made for COM and OLE. Iirc vb and vbscript basically spoke COM. Each BSTR is on the COM heap, and they have just one length field, no notion of "capacity". So you don't get amortized constant time appends. The NT kernel had UNICODE_STRING which had a capacity. So many string types...