At the moment, any write operation does a fully shallow copy, which is O(n) write, and also a full duplication of the original in terms of memory.
Clojure has shown us that, with sneaky data-sharing and a lovely GC, we can get this down to O(log n). The implementation for string-only shouldn't be too hard. Git 'er done.
At the moment, any write operation does a fully shallow copy, which is O(n) write, and also a full duplication of the original in terms of memory.
Clojure has shown us that, with sneaky data-sharing and a lovely GC, we can get this down to O(log n). The implementation for string-only shouldn't be too hard. Git 'er done.