3 ms·
So we have: * https://en.wikipedia.org/wiki/String_(computer_science) https://en.wikipedia.org/wiki/String_(computer_science) -- * https://en.wikipedia.org/w
by emmanueloga_ 4y ago
So we have:
* https://en.wikipedia.org/wiki/String_(computer_science) https://en.wikipedia.org/wiki/String_(computer_science)
--
* https://en.wikipedia.org/wiki/Rope_(data_structure) https://en.wikipedia.org/wiki/Rope_(data_structure)
* https://hn.algolia.com/?query=Ropes%2C%20an%20Alternative%20to%20Strings https://hn.algolia.com/?query=Ropes%2C%20an%20Alternative%20...
--
* https://en.wikipedia.org/wiki/Piece_table https://en.wikipedia.org/wiki/Piece_table
* https://hn.algolia.com/?query=%22Piece%20Table%22 https://hn.algolia.com/?query=%22Piece%20Table%22
--
* https://en.wikipedia.org/wiki/Gap_buffer https://en.wikipedia.org/wiki/Gap_buffer
* https://hn.algolia.com/?query=Gap%20Buffer https://hn.algolia.com/?query=Gap%20Buffer
--
Anything else? Would be nice to implement all of these as a single library!
What am I missing?
- asveikau 4y agoThis 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...
- deleted 4y ago[deleted]