2 ms·
constantly, needlessly, insanely doing nothing but MAKING COPIES OF DATA. That's simply not the case. With persistent data structures (used in languages such a
by chongli 13y ago
constantly, needlessly, insanely doing nothing but MAKING COPIES OF DATA.
That's simply not the case. With persistent data structures (used in languages such as Clojure, upon which Datomic is built), copying is kept to a minimum. If you've got a million-element hash-map and you want to associate a new key/value pair to it, you copy a path to the root of the tree -- an O(log32N) operation -- and you get a new map with 1,000,001 key/value pairs. Just for reference, log32 of 1,000,000 is ~4. This growth in complexity is so negligible that it ought to be considered constant for most practical purposes.