Hacker News new | ask | show | jobs
by rini17 237 days ago
But having only one reference is rare, often you extract several pieces of data from a huge string.

Unless the underlying storage is reference counted with some small granularity. That might be a way to go, when a substring is taken, split the original and keep track of the pieces separately.