News for hackers. Stuff that matters.
Re:Vstr: C string library designed to work optimally with ve... by chalst on Tuesday March 10, 2020 @11:17AM (#22536142)
If the claim is random access, then I agree that O(1) is imposssible. Rope would allow these tasks to be carried out in logarithmic time.

The tasks I chose were the first two API desiderata from http://www.and.org/vstr/design - which is the examples page you had in mind?

Re:Vstr: C string library designed to work optimally with ve... by joosters on Tuesday March 10, 2020 @11:45AM (#22536425)
I was quoting from the ‘about’ section of the linked page. I’m not deliberately trying to pick on or criticise this data structure, it’s certainly a good way of manipulating some forms of text (I’ve used similar data structures for efficient HTTP processing/mangling). It’s just that there can be hidden costs and the O(1) claims appeared misleading.