12 ms·
There was some work recently to improve the performance of persistent data structures. See http://clojure.org/transients http://clojure.org/transients Calling
by jefffoster 17y ago
There was some work recently to improve the performance of persistent data structures. See http://clojure.org/transients http://clojure.org/transients
Calling (transient x) gives you a mutable copy of x which is created in O(1) time. You can then use functions like conj! and assoc! to modify the data structure in place. When you've finished, call (persistent! x) which returns you to a pure data structure (another O(1) operation).
- fauigerzigerk 17y agoOk, but that has nothing to do with memory usage, which is my problem with clojure.