News for hackers. Stuff that matters.
Re:Rapidstring: Maybe the fastest string library ever by twic on Wednesday August 01, 2018 @07:06AM (#17661384)
I don't think it decreases the overall memory use of small strings - it just moves that use from the string struct to the character buffer. Bear in mind that in this design, the character buffer is never shared between multiple string structs; they each own their own separate buffer. If you want multiple references to the same string, you would use several pointers to a string struct, rather than having several string structs sharing the same buffer.

If you're coming from a GC'd language like Java, Ruby, etc, then there's a bit of a mindset shift around strings.

There are no comments on this comment yet.